Android 12 – Room db dao issue

Published

Getting this error on Android 12 only when trying to access the Dao for the first time in the app. Works perfectly fine in Android versions below.

Using the below config

    //Room
    implementation "androidx.room:room-runtime:2.3.0"
    implementation "androidx.room:room-rxjava2:2.3.0"
    kapt "androidx.room:room-compiler:2.3.0"

    //dagger2
    def daggerVersion = '2.40.1'
    implementation "com.google.dagger:dagger:${daggerVersion}"
    implementation "com.google.dagger:dagger-android:${daggerVersion}"
    implementation "com.google.dagger:dagger-android-support:${daggerVersion}"
    kapt("com.google.dagger:dagger-compiler:${daggerVersion}")
    kapt("com.google.dagger:dagger-android-processor:${daggerVersion}")

Error says:
file is not a database: , while compiling: select count(*) from sqlite_master;

Source: Android Questions

Published
Categorized as android, android-room, dagger-2, kotlin

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq