AndroidX Room unresolved supertypes RoomDatabase

The problem more likely lays with how you're defining your dependencies, RoomDatabase is part of the public API since your AppDatabase extends it and you presumably use that class in your downstream dependencies. However RoomDatabase is declared as a implementation-only dependency. This means that the class isn't normally available for the downstream dependencies during compilation.

Try changing "androidx.room:room-runtime:$androidXRoom" to the api configuration so it becomes part of the public API. That should probably resolve the error you're experiencing.


Change gradle dependencies like

   REMOVE -> implementation "androidx.room:room-runtime:$androidXRoom"
   REPLACE WITH -> api "androidx.room:room-runtime:$androidXRoom"

enter image description here