当我尝试打开网络浏览器(从Kindle Fire的家中),它只是简单的启动失败。 我检查了设备日志,能找到例外如下:有人可以解释这段代码片段
android.database.sqlite.SQLiteException:无法从版本升级29只读数据库27
我一派异常,并可以找到以下代码片段抛出这个异常。有人可以解释清楚吗?我需要为此做什么
try {
mIsInitializing = true;
String path = mContext.getDatabasePath(mName).getPath();
db = SQLiteDatabase.openDatabase(path, mFactory, SQLiteDatabase.OPEN_READONLY,
mErrorHandler);
if (db.getVersion() != mNewVersion) {
throw new SQLiteException("Can't upgrade read-only database from version " +
db.getVersion() + " to " + mNewVersion + ": " + path);
}
有人可以解释一下 –
我们看不到mNewVersion在哪里设置,但错误是说(非常差),仿真器或Android设备上的SQLite版本比预期版本高2个版本。 –
不是SQLite,而是数据库版本。只需在设置 - >管理应用程序中擦除浏览器的缓存数据,应该没问题。 –