1
回答
unable to open database file 求解决方法
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

Adb Error log 如下:

E/AndroidRuntime(  490): FATAL EXCEPTION: main
E/AndroidRuntime(  490): java.lang.RuntimeException: Unable to create service com.beyond.AlertService: android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime(  490):  at android.app.ActivityThread.handleCreateService(ActivityThread.java:1955)
E/AndroidRuntime(  490):  at android.app.ActivityThread.access$2500(ActivityThread.java:117)
E/AndroidRuntime(  490):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:985)
E/AndroidRuntime(  490):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  490):  at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(  490):  at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime(  490):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  490):  at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(  490):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
E/AndroidRuntime(  490):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
E/AndroidRuntime(  490):  at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  490): Caused by: android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1849)
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
E/AndroidRuntime(  490):  at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:549)
E/AndroidRuntime(  490):  at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
E/AndroidRuntime(  490):  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
E/AndroidRuntime(  490):  at com.beyond.sqlite.myDatabaseHelper.getWritableDatabase(myDatabaseHelper.java:143)
E/AndroidRuntime(  490):  at com.beyond.AlertService.onCreate(AlertService.java:175)
E/AndroidRuntime(  490):  at android.app.ActivityThread.handleCreateService(ActivityThread.java:1945)
E/AndroidRuntime(  490):  ... 10 more
首次下载应用时,会出现如上情况,求如何解决此问题

举报
蓝红雨田
发帖于6年前 1回/13K+阅
顶部