我尝试开发提醒应用程序。在应用程序中,我们可以添加提醒。我正在从引导接收器调用一项服务。在服务中,我在 SQLite 数据库中获取数据并显示提醒,但一旦服务启动。我尝试打开应用程序抛出异常
07-27 11:27:44.186: E/SQLiteLog(503): (14) cannot open file at line 30174 of [00bb9c9ce4]
07-27 11:27:44.186: E/SQLiteLog(503): (14) os_unix.c:30174: (2) open(/data/data/com.example.rxreminder/databases/com.example.rxreminder/databases/rem.sqlite) -
07-27 11:27:44.230: E/SQLiteDatabase(503): Failed to open database '/data/data/com.example.rxreminder/databases/com.example.rxreminder/databases/rem.sqlite'.
07-27 11:27:44.230: E/SQLiteDatabase(503): android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:669)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.example.rxreminder.database.DataBaseHelper.checkDataBase(DataBaseHelper.java:88)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.example.rxreminder.database.DataBaseHelper.createDataBase(DataBaseHelper.java:49)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.example.rxreminder.ReminderActivity.DatbaseSetup(ReminderActivity.java:275)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.example.rxreminder.ReminderActivity.onCreate(ReminderActivity.java:69)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.Activity.performCreate(Activity.java:5008)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.os.Handler.dispatchMessage(Handler.java:99)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.os.Looper.loop(Looper.java:137)
07-27 11:27:44.230: E/SQLiteDatabase(503): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-27 11:27:44.230: E/SQLiteDatabase(503): at java.lang.reflect.Method.invokeNative(Native Method)
07-27 11:27:44.230: E/SQLiteDatabase(503): at java.lang.reflect.Method.invoke(Method.java:511)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-27 11:27:44.230: E/SQLiteDatabase(503): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-27 11:27:44.230: E/SQLiteDatabase(503): at dalvik.system.NativeStart.main(Native Method)
07-27 11:27:44.276: D/AndroidRuntime(503): Shutting down VM
07-27 11:27:44.276: W/dalvikvm(503): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
07-27 11:27:44.316: E/AndroidRuntime(503): FATAL EXCEPTION: main
07-27 11:27:44.316: E/AndroidRuntime(503): java.lang.Error: Error copying database
07-27 11:27:44.316: E/AndroidRuntime(503): at com.example.rxreminder.database.DataBaseHelper.createDataBase(DataBaseHelper.java:69)
07-27 11:27:44.316: E/AndroidRuntime(503): at com.example.rxreminder.ReminderActivity.DatbaseSetup(ReminderActivity.java:275)
07-27 11:27:44.316: E/AndroidRuntime(503): at com.example.rxreminder.ReminderActivity.onCreate(ReminderActivity.java:69)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.Activity.performCreate(Activity.java:5008)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.ActivityThread.access$600(ActivityThread.java:130)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.os.Handler.dispatchMessage(Handler.java:99)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.os.Looper.loop(Looper.java:137)
07-27 11:27:44.316: E/AndroidRuntime(503): at android.app.ActivityThread.main(ActivityThread.java:4745)
07-27 11:27:44.316: E/AndroidRuntime(503): at java.lang.reflect.Method.invokeNative(Native Method)
07-27 11:27:44.316: E/AndroidRuntime(503): at java.lang.reflect.Method.invoke(Method.java:511)
07-27 11:27:44.316: E/AndroidRuntime(503): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
07-27 11:27:44.316: E/AndroidRuntime(503): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
07-27 11:27:44.316: E/AndroidRuntime(503): at dalvik.system.NativeStart.main(Native Method)