画布A1(AQ4501_sprout),Dream Uno(Mi-498_sprout),sparkle V(sparkle_V_sprout) @H_301_7@崩溃日志: @H_301_7@
Caused by: androID.database.sqlite.sqliteCantopenDatabaseException: unkNown error (code 14): Could not open database at androID.database.sqlite.sqliteConnection.nativeOpen(Native Method) at androID.database.sqlite.sqliteConnection.open(sqliteConnection.java:207) at androID.database.sqlite.sqliteConnection.open(sqliteConnection.java:191) 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:806) at androID.database.sqlite.sqliteDatabase.open(sqliteDatabase.java:791) at androID.database.sqlite.sqliteDatabase.openDatabase(sqliteDatabase.java:694) at androID.app.ContextImpl.openorCreateDatabase(ContextImpl.java:571) at androID.content.Contextwrapper.openorCreateDatabase(Contextwrapper.java:269) at androID.database.sqlite.sqliteOpenHelper.getDatabaseLocked(sqliteOpenHelper.java:223) at androID.database.sqlite.sqliteOpenHelper.getWritableDatabase(sqliteOpenHelper.java:163)@H_301_7@参考代码(崩溃发生在db.getWritableDatabase()): @H_301_7@
//Application classpublic class MyApp extends Application { @OverrIDe public voID onCreate() { super.onCreate(); dataBaseInit(); } private voID dataBaseInit() { db = new MyDatabase(getApplicationContext()); // This will open an reference to database dataBaseRef = db.getWritableDatabase(); }}//Database classpublic class MyDatabase extends sqliteOpenHelper { // All Static variables // Database Version private static final int DATABASE_VERSION = 1; // Database name private static final String DATABASE_name = "myDatabase"; public MyDatabase(Context context) { super(context,DATABASE_name,null,DATABASE_VERSION); }@H_301_7@} @H_301_7@崩溃发生在db.getWritableDatabase(). @H_301_7@请告知如何解决这个问题.解决方法 我在清单中添加“androID.permission.WRITE_EXTERNAL_STORAGE”权限后仍然遇到问题,但仍然像上面那样崩溃了. 总结
以上是内存溢出为你收集整理的Android 6.0更新导致在init期间DB sqlite崩溃全部内容,希望文章能够帮你解决Android 6.0更新导致在init期间DB sqlite崩溃所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)