我有一个Android应用程序,我只想使用Proguard混淆它(因此,我有-dontoptimize -dontshrink -dontpreverify标志)。当我使用Proguard构建时,Proguard本身不会抛出任何错误,但然后dex会抛出以下异常:
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
应用程序立即因NullPointerException而崩溃。
我正在使用Android Studio进行构建,使用最新版本的Proguard,在默认的proguard文件和一些额外的-keep选项和-dontwarn选项上。有什么想法是什么原因导致这种情况?谢谢!