我有一个基本模块,我想创建一个包含一些库的功能。其中一个库位于基本模块中,当我将其移至功能并从基本模块中删除时,出现错误:
APT: error: resource style/SDKTheme.Translucent (aka io.app.dev.debug:style/SDKTheme.Translucent) not found.
如果基本模块和功能模块具有这种依赖关系,它就可以工作,但在这种情况下,我失去了分离的好处。
我发现了一个已知问题:
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.
这是我的问题吗?
最佳答案
是的,这正是你的问题。
解决方案是:
<style name="SDKTheme.Translucent" />
发生的情况是 list 合并在合并过程中采用了这种样式,即使样式的实际实现是通过特性模块的样式引入的。
欲了解更多信息,请阅读 Ben Weiss 的这篇博文 - https://medium.com/androiddevelopers/a-patchwork-plaid-monolith-to-modularized-app-60235d9f212e
关于android - 动态特征。错误 : failed processing manifest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52111547/