Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLiteCantOpenDatabaseException at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:266) #1006

Open
nAkhmedov opened this issue Dec 15, 2019 · 2 comments

Comments

@nAkhmedov
Copy link

I am facing this issue too on Android 8

java.lang.RuntimeException:
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6532)
at android.app.ActivityThread.-wrap2 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1963)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7425)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:223)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:207)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:511)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:194)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:183)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:880)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:864)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:767)
at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:820)
at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:299)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:266)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:206)

@Rahul5234
Copy link

We are also facing this issue, Is there any update on this. Anyone able to fix it?
Any help would be appericiated.

@greenrobot-team
Copy link
Collaborator

@Rahul5234 There are various reasons why SQLiteCantOpenDatabaseException might be thrown, e.g. missing write permissions. I suggest to guard that code and add some reporting to see the exception message to get more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants