Sto tentando di copiare un database esistente dalla mia cartella delle risorse ed eseguire alcune operazioni su di esso. Tutto sta funzionando benissimo, ma ho ottenuto il seguente errore nel file di registro del mio emulatore:SQLite ha restituito un codice di errore di 14
sqlite returned: error code = 14, msg = cannot open file at source line 25467
09-06 11:23:41.844: INFO/Database(22560): sqlite returned: error code = 14, msg = cannot open file at source line 25467
09-06 11:23:41.885: ERROR/Database(22560): sqlite3_open_v2("/data/data/com.dhani.Lazy/databases/LazyDB.sqlite", &handle, 1, NULL) failed
09-06 11:23:41.885: WARN/System.err(22560): android.database.sqlite.SQLiteException: unable to open database file
09-06 11:23:41.894: WARN/System.err(22560): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
09-06 11:23:41.904: WARN/System.err(22560): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1849)
09-06 11:23:41.914: WARN/System.err(22560): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
09-06 11:23:41.914: WARN/System.err(22560): at com.dharani.LazyApple.Database.DataBaseHelper.checkDataBase(DataBaseHelper.java:72)
09-06 11:23:41.914: WARN/System.err(22560): at com.dharani.LazyApple.Database.DataBaseHelper.createDataBase(DataBaseHelper.java:47)
09-06 11:23:41.914: WARN/System.err(22560): at com.dharani.LazyApple.Database.DataBaseHelper.Login(DataBaseHelper.java:166)
09-06 11:23:41.914: WARN/System.err(22560): at com.dharani.LazyApple.Views.LoginView$1.onClick(LoginView.java:63)
09-06 11:23:41.934: WARN/System.err(22560): at android.view.View.performClick(View.java:2485)
09-06 11:23:41.934: WARN/System.err(22560): at android.view.View$PerformClick.run(View.java:9080)
09-06 11:23:41.944: WARN/System.err(22560): at android.os.Handler.handleCallback(Handler.java:587)
09-06 11:23:41.944: WARN/System.err(22560): at android.os.Handler.dispatchMessage(Handler.java:92)
09-06 11:23:41.944: WARN/System.err(22560): at android.os.Looper.loop(Looper.java:123)
09-06 11:23:41.944: WARN/System.err(22560): at android.app.ActivityThread.main(ActivityThread.java:3683)
09-06 11:23:41.964: WARN/System.err(22560): at java.lang.reflect.Method.invokeNative(Native Method)
09-06 11:23:41.964: WARN/System.err(22560): at java.lang.reflect.Method.invoke(Method.java:507)
09-06 11:23:41.964: WARN/System.err(22560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-06 11:23:41.964: WARN/System.err(22560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-06 11:23:41.964: WARN/System.err(22560): at dalvik.system.NativeStart.main(Native Method)
Tutti i suggerimenti su come risolvere questo problema?
Sei sicuro di avere il file '" /data/data/com.dhani.Lazy/databases/LazyDB.sqlite "'? – Caner
@LAS_VEGAS si, avere il file in "/data/data/com.dhani.Lazy/databases/LazyDB.sqlite" e posso anche eseguire query SQLite su di esso. tutto è funzionante ma nel log compare l'errore sopra. – Kishore