实际上我将GCM通知存储在GCM通知接收器上的本地数据库中, 但是批量通知到来时我收到了错误。
Non-fatal Exception: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:994)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:256)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.minditsystems.app1.model.GCMNotificationDB.setContext(GCMNotificationDB.java:33)
at com.minditsystems.app1.model.GCMNotificationDB.<init>(GCMNotificationDB.java:27)
at com.minditsystems.app1.Recievers.GCMNotificationIntentService.onHandleIntent(GCMNotificationIntentService.java:83)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
答案 0 :(得分:1)
可能重复 android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database 要么 android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database trouble 要么 SQLite Android cannot open database file
然而......具体解决方案需要更多信息。清除WRITE_EXTERNAL_STORAGE权限的清单。