Android has a non-mandatory exception that is often found on the online crash: sqliteexception
This abnormal many people in the use of WebView, it is not necessary, the probability is not high, you will usually be online crash report will find it. There are divergent reasons. Here are two triggering scenarios:
1, SQLite in order to protect the db file consistency, when accessing the DB file, will give the file a process lock, in this case, if there is another process to access the DB file, there will be an error. So, you must have thought that your apk will trigger this exception if the following two conditions are met: 1, using WebView 2, using multiple processes. Because WebView will write the cache to the db file, it will certainly involve the DB operation, which is application range. When multiple processes are used, there is a possibility that the webview of different processes will operate on the same DB file process, and the exception is occasionally thrown out.
Finally, in accordance with the old Android code of the style of farming, of course, to give a solution: rewrite the application.openorcreatedatabase, so that different processes to create a different db file is good.
2, Cookiesyncmanager in the forced synchronization of cookies will also appear in SQLite IO exception. Therefore, forced synchronization requires careful use. If you do not involve multi-process sharing cookies, it is best not to force synchronization yourself.
Debug WebView Database Exception (reprint)