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
Failed to open database #12
Comments
Unfortunately its a bit of a generic error that means the file could not be opened. Make sure you only create one SQLiteOpenHelper, or always close the db before trying to open it again. When does that happen, the first time you run your app? Also which version are you using 3.12.2? |
I am sure only create one SQLiteOpenHelper, and i use 3.12.2, it happen at the first time i run my app. my error is happen at sqlite_open_v2 in android_database_SQLiteConnection.cpp nativeopen function . it can open database but can't create db. Could you send me a demo , show how to use you lib by source integration ? my email is 8394420@qq.com or hyy8394420@gmail.com |
It should work fine if that is the case. What version of Android are you running this on? |
Was able to reproduce this problem, sqlite is not able to create the file natively. Will post an updated build with the fix soon. |
Please try the 3.12.2-1 version |
can anyone please help me 10-02 20:29:35.538 9551-9551/mypackage E/SQLiteAssetHelper: Couldn't open bsdb.db for writing (will try read-only): |
I use this in my demo . why it can't create database?
04-19 11:04:58.985 19818-19818/? E/SQLiteLog: (14) cannot open file at line 33279 of [fe7d3b75fe]
04-19 11:04:58.985 19818-19818/? E/SQLiteLog: (14) os_unix.c:33279: (2) open(/data/data/com.weiyun.fastquery/databases/weiyun.db) -
04-19 11:04:58.985 19818-19818/? E/SQLiteDatabase: Failed to open database '/data/data/com.weiyun.fastquery/databases/weiyun.db'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
at io.requery.android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at io.requery.android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:221)
at io.requery.android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
at io.requery.android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:468)
at io.requery.android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:189)
at io.requery.android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:181)
at io.requery.android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:835)
at io.requery.android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:820)
at io.requery.android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:726)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:245)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:174)
at com.weiyun.fastquery.db.UploadDBHelper.insertJob(UploadDBHelper.java:38)
at com.weiyun.fastquery.MainActivity.onCreate(MainActivity.java:33)
The text was updated successfully, but these errors were encountered: