-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature module依赖library module,引用library module资源时报错找不到 #58
Comments
feature模块编译时R文件只从当前模块里面找,这个改当项目缺失比较恶心了 |
除了这个问题之外,你可能还会遇到 feature module单独依赖的 library module在引用宿主资源时候,能编译过但会触发运行时崩溃。这两种问题都能通过改R文件路径来解决。
|
================================================== |
对于没有R.java直接生成R.jar的编译,这边尝试着修改字节码,移除base module的final,让feature module R.class继承base R.class。 |
请问具体怎么实现呢,我在feature module里面 用asm让 feature modue的R继承了base module的R 但是编译期间还是提示找不到符号 |
用ASM也可以,我是用Javassist,添加个修改R.jar的task,对于base模块,先解压原本的R.jar,然后移除class的final,不然没法继承,再重新打包成R.jar,替换。对于feature模块,就直接修改为继承base的R就好 |
你好,feature module依赖library module,引用library module资源时报错找不到,得写对应R的全路径。请问有没有更好办法
The text was updated successfully, but these errors were encountered: