didi / booster

🚀Optimizer for mobile applications
https://booster.johnsonlee.io
Apache License 2.0
4.9k stars 579 forks source link

booster-transform-r-inline not full delete R&styleable field #447

Open tudou0digua opened 10 months ago

tudou0digua commented 10 months ago

Please provide the following informations.

R&styleable 被内联之后,旧的 R&styleable 的变量声明被删除了,但是变量赋值还在

styleable 类 由:

public static final class styleable { static { public static final int[] ActionBar = new int[]{.........}; public static final int[] ActionBarLayout = new int[]{16842931}; public static final int[] ActionMenuItemView = new int[]{16843071}; } }

变为了:

public static final class styleable { static { ActionBar = new int[]{.........}; ActionBarLayout = new int[]{16842931}; ActionMenuItemView = new int[]{16843071}; } }

缺少了变量名称前的 变量类型声明 例如:public static final int[] ActionBar = new int[]{.........}; 前面的 public static final int[] 不见了

项目组件化之后,如何使用插件检测类的变量是否存在,会报错 因为,class 文件中,对变量的引用和赋值还在,但是,变量的声明不见了

能否将变量的赋值也进行删除

tudou0digua commented 10 months ago

项目组件化之后,如何使用插件检测类的变量是否存在,会报错 因为,class 文件中,对变量的引用和赋值还在,但是,变量的声明不见了

能否将变量的赋值也进行删除