No such table android_metadata, what's the problem?

后端 未结 7 1800
后悔当初
后悔当初 2020-12-07 15:37

I am copying a pre-existing database to /data/data/packagename/databases using code learned from using-your-own-sqlite-database-in-android-applications

7条回答
  •  囚心锁ツ
    2020-12-07 16:15

    Use

    SQLiteDatabase.openDatabase(dbPath, null,SQLiteDatabase.NO_LOCALIZED_COLLATORS | SQLiteDatabase.CREATE_IF_NECESSARY);
    

    or

    SQLiteDatabase.openDatabase(dbPath, null,SQLiteDatabase.OPEN_READWRITE);
    

提交回复
热议问题