Hi Leandro, I had the same thing yesterday.
Idk about your project structure, but I have something like this:
:shared
---- :database
-------- AppDatabase
-------- Dao1
-------- Dao2
-------- etc...
:feature
---- :database
-------- FeatureDao
---- :model
-------- FeatureModel
In the initial setup of the db I put everything under
:shared:database
, but I decided to move things into their own feature module (also daos and db models). So now I just add
projects.feature.database
as a dependency in the
projects.shared.database
module to keep things separated.
Like you said on android everything works well, but when I try to run the iOS app I get the same error.
After many attempts I resolved this by duplicating
FeatureDao
and
FeatureModel
inside
projects.shared.database
module and use those in my `AppDatabase`class instead of the one in
projects.feature.database
.
I don’t like this setup because everything is mixed up and it slows down the builds when I want to change something of Feature1 which is unrelated to Feature2. I’ll let you know if I find a proper solution, but for now you may want to put in one module the daos, models and the database class.