Skip to content
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

Injecting Room Databases #61

Closed
mvp-sales opened this issue Feb 22, 2018 · 3 comments
Closed

Injecting Room Databases #61

mvp-sales opened this issue Feb 22, 2018 · 3 comments

Comments

@mvp-sales
Copy link

Hello, I have an abstract class named AppDatabase, which inherits from RoomDatabase. I am trying to use Koin to provide AppDatabase to my repositories.

I have this line in one of my modules:

provide (isSingleton = true) { Room.databaseBuilder(androidApplication(), AppDatabase::class.java, Constants.DATABASE_NAME).build() }

When I run my app, I get this error:
java.lang.RuntimeException: cannot find implementation for br.com.evologica.biblio_android.data.database.AppDatabase. AppDatabase_Impl does not exist

Is there any way I can solve this problem?

@arnaudgiuliani
Copy link
Member

Hello,

seems to be more a Room problem. Did you tried to just run Room.databaseBuilder(androidApplication(), AppDatabase::class.java, Constants.DATABASE_NAME).build() ?

@mvp-sales
Copy link
Author

I did a quick search, and indeed, it seems to be a problem with Room. Thanks for your help.

@mdgarri
Copy link

mdgarri commented Nov 30, 2021

I did a quick search, and indeed, it seems to be a problem with Room. Thanks for your help.

Did you solved it? Can you share it pls if you did ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants