几周前,我开始看到我的Android应用程序的崩溃报告,其中包含以下堆栈跟踪。 这只发生在运行android 5.x的魅族设备上 此崩溃与我的应用程序无关,但我想知道您是否有任何关于如何防止这种情况的信息(ROM设置,WebView解决方法......) 我在Google上找不到关于此错误的任何信息......
Fatal Exception: android.database.sqlite.SQLiteException: table httpauth already exists (code 1): , while compiling: CREATE TABLE httpauth (_id INTEGER PRIMARY KEY, host TEXT, realm TEXT, username TEXT, password TEXT, UNIQUE (host, realm) ON CONFLICT REPLACE);
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java)
at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java)
at com.android.org.chromium.android_webview.HttpAuthDatabase.createTable(HttpAuthDatabase.java)
at com.android.org.chromium.android_webview.HttpAuthDatabase.initDatabase(HttpAuthDatabase.java)
at com.android.org.chromium.android_webview.HttpAuthDatabase.initOnBackgroundThread(HttpAuthDatabase.java)
at com.android.org.chromium.android_webview.HttpAuthDatabase.access$000(HttpAuthDatabase.java)
at com.android.org.chromium.android_webview.HttpAuthDatabase$1.run(HttpAuthDatabase.java)
答案 0 :(得分:0)
一方面,您可以使用DROP TABLE IF EXISTS删除表,或者另一方面可以使用CREATE TABLE创建IF IF NOT EXISTS
答案 1 :(得分:0)
我遇到了同样的东西,我找不到任何有用的东西。 我认为它是由Flyme OS(MeiZu设备)引起的。
Version: 6.1.1(594)
Android: 5.1(MX4)
android.database.sqlite.SQLiteException: table httpauth already exists (code 1): , while compiling: CREATE TABLE httpauth (_id INTEGER PRIMARY KEY, host TEXT, realm TEXT, username TEXT, password TEXT, UNIQUE (host, realm) ON CONFLICT REPLACE);
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:898)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:509)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1704)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1635)
at com.android.org.chromium.android_webview.HttpAuthDatabase.createTable(HttpAuthDatabase.java:132)
at com.android.org.chromium.android_webview.HttpAuthDatabase.initDatabase(HttpAuthDatabase.java:123)
at com.android.org.chromium.android_webview.HttpAuthDatabase.initOnBackgroundThread(HttpAuthDatabase.java:90)
at com.android.org.chromium.android_webview.HttpAuthDatabase.access$000(HttpAuthDatabase.java:29)
at com.android.org.chromium.android_webview.HttpAuthDatabase$1.run(HttpAuthDatabase.java:69)