I have a base module and I'd wanted to create feature one which contains some libs. One of this libs was into the base module and when I moved it to the feature and removed it from base one I got an error:
APT: error: resource style/SDKTheme.Translucent (aka io.app.dev.debug:style/SDKTheme.Translucent) not found.
It works if base and feature modules have this dependency, but in this case I lost a profit of separating.
I found a known issue:
In a dynamic feature module’s manifest, you should not reference resources that don’t exist in the base module. That’s because, when Google Play generates your app’s base APK, it merges manifests for all modules into that of the base APK. So, resource linking breaks if the base APK’s manifest references resources that don’t exist in the base APK.
is this my problem?
Yes, that exactly is your problem.
Solutions are:
<style name="SDKTheme.Translucent" />
What happens is that the manifest merger picks up this style during merging, even though the actual implementation of the style is being introduced through the feature module’s styles.
For more information, read this blog post by Ben Weiss - https://medium.com/androiddevelopers/a-patchwork-plaid-monolith-to-modularized-app-60235d9f212e
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