Closed fengyuanduan closed 5 years ago
What steps will reproduce the problem? 该问题的重现步骤是什么? 在Application的onCreate()中初始化sonic引擎 if (!SonicEngine.isGetInstanceAllowed()) { SonicEngine.createInstance(new HostSonicRuntime(getApplicationContext()), new SonicConfig.Builder().build()); } 异常监控中发现很多报这个错,非必现,概率性出现这个问题 android.database.sqlite.SQLiteCantOpenDatabaseException android.app.ActivityThread.handleBindApplication(ActivityThread.java:5939) android.app.ActivityThread.-wrap2(ActivityThread.java) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1784) android.os.Handler.dispatchMessage(Handler.java:110) android.os.Looper.loop(Looper.java:232) android.app.ActivityThread.main(ActivityThread.java:6802) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:236) android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:220) android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:843) android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:828) android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:721) android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:769) android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:300) android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163) com.tencent.sonic.sdk.SonicEngine.initSonicDB(SonicEngine.java:113) com.tencent.sonic.sdk.SonicEngine.createInstance(SonicEngine.java:102) com.oppo.community.app.我的application在这里初始化sonic引擎 android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024) android.app.ActivityThread.handleBindApplication(ActivityThread.java:5936) ... 8 more
What is the expected output? What do you see instead? 你期待的结果是什么?实际看到的又是什么?
What version of the product are you using? On what operating system? 你正在使用产品的哪个版本?在什么操作系统上? 使用的sonic sdk-3.0.0,集中出现在Android 7.1.1
Please provide any additional information below. 如果有的话,请在下面提供更多信息。
我们一般不再application初始化,里面比较轻量,是启动H5Activity时再去创建session,感觉这块跟时机有点关系 看网上搜索 试试这个权限问题 https://blog.csdn.net/lmw21848/article/details/53284653
What steps will reproduce the problem? 该问题的重现步骤是什么? 在Application的onCreate()中初始化sonic引擎 if (!SonicEngine.isGetInstanceAllowed()) { SonicEngine.createInstance(new HostSonicRuntime(getApplicationContext()), new SonicConfig.Builder().build()); } 异常监控中发现很多报这个错,非必现,概率性出现这个问题 android.database.sqlite.SQLiteCantOpenDatabaseException android.app.ActivityThread.handleBindApplication(ActivityThread.java:5939) android.app.ActivityThread.-wrap2(ActivityThread.java) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1784) android.os.Handler.dispatchMessage(Handler.java:110) android.os.Looper.loop(Looper.java:232) android.app.ActivityThread.main(ActivityThread.java:6802) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:236) android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:220) android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463) android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185) android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177) android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:843) android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:828) android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:721) android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:769) android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:300) android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223) android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163) com.tencent.sonic.sdk.SonicEngine.initSonicDB(SonicEngine.java:113) com.tencent.sonic.sdk.SonicEngine.createInstance(SonicEngine.java:102) com.oppo.community.app.我的application在这里初始化sonic引擎 android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024) android.app.ActivityThread.handleBindApplication(ActivityThread.java:5936) ... 8 more
What is the expected output? What do you see instead? 你期待的结果是什么?实际看到的又是什么?
What version of the product are you using? On what operating system? 你正在使用产品的哪个版本?在什么操作系统上? 使用的sonic sdk-3.0.0,集中出现在Android 7.1.1
Please provide any additional information below. 如果有的话,请在下面提供更多信息。