Caused by: android.database.sqlite.SQLiteException: no such table: (code 1) Android

后端 未结 16 2406
一整个雨季
一整个雨季 2020-12-15 05:01

We have a sqlite database in our Application. Its working fine for all the users but few of them experiencing the Caused by: android.database.sqlite.SQLiteException: n

16条回答
  •  孤街浪徒
    2020-12-15 05:46

    try remove getReadableDatabase

     if (!dbExist) {
                synchronized (this) {
    
                    db_Read = this.getReadableDatabase();
                    Log.e("Path 2", this.getReadableDatabase().getPath());
                    db_Read.close();
    
                    copyDataBase();
                    Log.v("copyDataBase---", "Successfully");
                }
    

    to

     if (!dbExist) {
                synchronized (this) {
    
                    //db_Read = this.getReadableDatabase();
                  //  Log.e("Path 2", this.getReadableDatabase().getPath());
                  //  db_Read.close();
    
                    copyDataBase();
                    Log.v("copyDataBase---", "Successfully");
                }
    

提交回复
热议问题