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

后端 未结 16 2399
一整个雨季
一整个雨季 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:28

    Even if you have coded for few tables and upgraded database, your app will crash. What you have to do is for each and every table create database changes upgrade the DATABASE_VERSION

    If you have few DatabaseHelper classes(read this), you have to add this method to your db helper:

    @Override
    public void onOpen(SQLiteDatabase db) {
        onCreate(db);
    }
    

提交回复
热议问题