CodingGay / BlackObfuscator-ASPlugin

This project is an Android Studio plugin version of BlackObfuscator, it supports obfuscating code automatically. More information about this project are in BlackObfuscator.
Apache License 2.0
422 stars 121 forks source link

Error: Detail Error Information in File #29

Open Krosxx opened 1 year ago

Krosxx commented 1 year ago

打包出现错误:

BlackObf Class: Lxxx/zp;#<init>
BlackObf Class: Lxx/zp;#i
BlackObf Class: Lxx/zp;#x
BlackObf Class: Lxx/zp;#xx
Detail Error Information in File ./1690794457967splitclasses.dex-error.zip
Please report this file to https://github.com/pxb1988/dex2jar/issues if possible.
jar2dex /xx/app/build/intermediates/dex/release/minifyReleaseWithR8/1690794457967obfclasses.dex.jar -> /xxxxx/app/build/intermediates/dex/release/minifyReleaseWithR8/1690794457967obfclasses.dex.dex
call com.android.dx.command.Main.main[--dex, --no-strict, --output=/xxxx/app/build/intermediates/dex/release/minifyReleaseWithR8/1690794457967obfclasses.dex.dex, /xxxx/app/build/intermediates/dex/release/minifyReleaseWithR8/1690794457967obfclasses.dex.jar]

之前是正常的。 出现这个 apk 正常生成,但是运行时 异常,例如 kotlin companion object 实例为 null。 不排除本地改动影响,但无法一一排除。请教可能出现此问题的原因?

Krosxx commented 1 year ago

dex-error.zip 文件

.....
================= 3 ===================
Lxxx/O0OO0O00;->intent(Landroid/widget/SpinnerAdapter;Landroid/graphics/drawable/Drawable;)I
java.lang.RuntimeException: Method code too large!

.......

之前配置的 depth = 2 正常使用,某次修改 depth = 10, 就一直报 Detail Error Information in File,已经改回 depth = 2 甚至 depth = 0, 且尝试过 Clean Project, 仍未解决

Krosxx commented 1 year ago

https://github.com/pxb1988/dex2jar

Krosxx commented 1 year ago

已解决,原因是某个类里的方法过大,~200行;最后抽取方法来解决。 ps: 上边的 dex-error 有误导:显示的是混淆后的方法,并且不是问题方法。查找根源问题先关闭代码混淆,再看报错。

Krosxx commented 1 year ago

问题再次出现... 代码未改动 https://github.com/CodingGay/BlackObfuscator/issues/17