Saturday, February 4, 2012

Re: [android-developers] Unable to open database file?

When are you doing this? Perhaps a bit too early?

I've not had any issues with opening database files from inside a content provider.

My CP opens the db on demand, deferring the actual database open until the first call to the CP's query, etc.

-- Kostya

3 февраля 2012 г. 5:08 пользователь Zsolt Vasvari <zvasvari@gmail.com> написал:
Hi, I am using ACRA and get an average of one report of this kind a day:
 
android.database.sqlite.SQLiteException: unable to open database file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1956)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:902)
 
This is a one time error, if the user tries again, it works.  It seems to come from all kinds of users on all kinds of devices on different SDK levels.
 
I open my database once and I store the connection in a static object. 
 
I suspect a bug in my code somehow, but I am at a loss.  Anybody with any ideas, or seen this error happen?
 
Thanks!
 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment