Room attempt to re-open an already closed database

Viewed 21826

When using Room from the Android Architecture Components, I received the following error when attempting to access the database using a Dagger component:

java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: (database path)

I was using Dagger version 2.11 and Room version 1.0.0-alpha7. The error was reproducible on version 1.0.0-alpha5.

This error occurred on any attempt to access the database through a DAO after initialising the database and injecting it into my class.

3 Answers
Related