3

android studio 添加 gradle 配置 jackOpions{enable true}后,字符串被混淆

 2 years ago
source link: https://www.v2ex.com/t/790692
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

android studio 添加 gradle 配置 jackOpions{enable true}后,字符串被混淆

  XCG0000 · 3 小时 21 分钟前 · 77 次点击

android studio 添加 gradle 配置 jackOpions{enable true}后,用于反射的字符串被混淆,如下:

Class.forName("com.android.test"); 被混淆成 Class.forName("a.a");

去掉 jackOpions{enable true}就没有问题,就不会被混淆;

都是在 release 下,Build apk 。

什么原因呀?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK