Ben Gooding
07/01/2024, 5:35 PMRoom DB
ksp annotation processing with enabling minification
It works fine without minification
I'm getting this error
Caused by: java.lang.NoSuchMethodException: <http://com.MY|com.MY>_PROJECT.data.room.AppDatabase_Impl.<init> []
So it's not finding the created class, although I can see it is generated at
app/build/generated/ksp/release/java/com/MY_PROJECT/data/room/AppDatabase_Impl.java
I've included these in my ProGuard rules which I would assume would protect them from minification too
-keep class * extends androidx.room.RoomDatabase
-keep class * extends com.MY_PROJECT.data.room.AppDatabase
Does anyone have any ideas what could be wrong?Ben Gooding
07/01/2024, 10:39 PMMyDatabase::class.java
->
factory = { MyDatabase::class.instantiateImpl() }
when initialising the database to avoid reflection usage