I had been getting " android.database.sqlite.SQLiteDatabaseLockedException" exception from production when I had been using 3rd party non-thread safe sqlite libraries. I checked all the threads and connection closing, I made all instances singleton but I wasn't able to solve the problem (I haven't even reproduce case myself). Then I moved my orm to Room database which is completely thread safe. But I'm still getting the exactly same error from production. So isn't Room db thread safe and isn't it take care of concerns for conventional sqlite libraries as Google mentioned? Is there anybody who faces db locked error with Room?
Please, check https://stackoverflow.com/a/63849367/3256989 .
In short words, try to use enableMultiInstanceInvalidation() during building RoomDatabase.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With