I have the following project structure which I want to convert to a instant apps. The installed project works fine, but when I want to runt the instant app version, the base feature module loads perfectly, but when it comes to the feature module, then it fails to find the resources from its module. When I move the resources from feature module to base module, then it recognizes them with the full package name of the base feature module.
The project structure is the following:
- app module
- instant app module
- base feature module - com.app.base.feature
- feature module - com.app.feature.
in feature module when the resource is located in feature module itself the resources are not found, but they are found when I move the resource into the base feature module and reference them as following com.app.base.feature.R.layout.sample_layout.
EDIT: No known package when getting value for resource number 0x80060009.
Any kind of help would be appreciated :)
When you modularise your app, the base feature module cannot access any classes or resources present in the feature module. However the vice versa is possible.
It might so happen that when you create the fragment, the R class might be pointing to the base module. Try specifying the full path to the feature module R class while accessing the layout and check if it solves your issue. Just go through all your R class references and specify full paths to base and feature R classes wherever necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With