I have an Android app that I'm only trying to confuse with Proguard (hence I have the -dontoptimize -dontshrink -dontpreverify flags). When I build using Proguard, proguard itself does not throw any errors, but then dex throws the following exception:
Exception in thread "pool-1-thread-1" com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:810) ... at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef
and the application will immediately fire from a NullPointerException.
I create in Android Studio, with the latest version of Proguard, in the default proguard file and some additional parameters -keep and -dontwarn. Any ideas what causes this? Thanks!
android obfuscation proguard dex
Caleb an
source share