bytedance / ByteX

ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台
Apache License 2.0
3.13k stars 462 forks source link

ShrinkR把R文件统一成一个以后,没有替换module里面的R引用 #149

Open axel8888 opened 1 year ago

axel8888 commented 1 year ago

主app里的R引用包都被替换了,但是module里面的都还是引用module的R,导致找不到资源崩溃

TellH commented 1 year ago

module的R不会打到aar里的,在app打包时统一生成的。ShrinkR会遍历所有R的引用,并替换。找不到资源崩溃,可以先把堆栈发出来看看。

hfgerr commented 9 months ago

全量编译,开启bytex 的shrinkR 没问题,但是 增量编译时,library project使用的R文件没有内联,会导致Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx.xxx.R$string"