I know there are many topic that have the same title, but I've tried all of them. I couldn't solve my problem.
The error I get is exactly this:
android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1: /data/data/com.halilkaya.flashcard/databases/flashcarddb.db
Actually, it works on the emulator, but when I install it on my phone, it doesn't work!
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Handling ffmpeg library interface change when upgr
When I hit this there was another sql exception earlier in the logcat (my HTC OneX test phone likes to hide crashes and make me go looking for them instead of just crashing). I had a malformed statement in my upgrade logic. Once I cleared that up I no longer got the "can't upgrade read-only database" error.
this is a class that is started from an onclick button using an intent.
(disp_emails_sent.this) shown above is usually where you would pass your context. this.getApplicationContext() didnt work for me but this did.
Not sure how it worked but it did.
Did try the above answers provided by the community but this wasnt the issue.
Would like an explanation if anyone has it.
Hope you are dropping the table and upgrading it aagain as below