I’m using Preload Database with multiple Tables with data already present in tables in all tables. My Error logcat shows “no such table: cake (code 1 SQLITE_ERROR): , while compiling: select * from cake at” but actually table and its data are already there.
I have also checked copied database in Phone, it was there but in code it is displaying the error above.
How to solve this problem??
Note : This error occurs only in Google Pixel Phone..
AndroidRuntime: FATAL EXCEPTION: main Process: com.ebizzapps.swadishtcookingrecipesinhindi, PID: 9060 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ebizzapps.swadishtcookingrecipesinhindi/com.ebizzapps.swadishtcookingrecipesinhindi.DetailRecipe}: android.database.sqlite.SQLiteException: no such table: cake (code 1 SQLITE_ERROR): , while compiling: select * from cake at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.database.sqlite.SQLiteException: no such table: cake (code 1 SQLITE_ERROR): , while compiling: select * from cake at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:903) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:514) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58) at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37) at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46) at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1408) at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1347) at com.ebizzapps.swadishtcookingrecipesinhindi.DBHelper.getDatas(DBHelper.java:162) at com.ebizzapps.swadishtcookingrecipesinhindi.DetailRecipe.onCreate(DetailRecipe.java:161) at android.app.Activity.performCreate(Activity.java:7136) at android.app.Activity.performCreate(Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)