2016-04-26 42 views
0

「ASM-4.0.jar」, 「org.objectweb.asm」,如果包括此的.jar,我得到這個錯誤,而建設:Proguard混淆時出現一個jar亂碼,我該怎麼辦?

AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef","sources":[{}]} 
AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef","sources":[{}]} 
AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef","sources":[{}]} 
AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef","sources":[{}]} 
AGPBI: {"kind":"error","text":"4 errors; aborting","sources":[{}]} 

有些部分從Proguard的配置:

#-libraryjars libs/asm-4.0.jar 
-keep class !org.objectweb.asm.** { *; } 
-dontwarn org.objectweb.asm.** 

完整的ProGuard配置:http://pastebin.com/mxXK4WvY

-dontobfuscate

這行使proguard工作,但我需要混淆。

我該怎麼辦?這個罐子是Kryonet需要的,我的整個遊戲都是建立在它上面的。

+2

嚴正花說看起來不對。 – rekire

+0

@rekire,但如果我刪除它,沒有任何變化,仍然不起作用 –

+1

我剛剛檢查了你的proguard文件。這是我見過的最長的一次。你確定只有四條線會導致問題嗎?你可以用[jadx](https://github.com/skylot/jadx)檢查你的apk文件的內容來檢查哪些類被刪除。 – rekire

回答

0

我想我固定它通過使這樣的:「!」

-keep class org.objectweb.asm.** { *; } 
-keepclassmembers class org.objectweb.asm.** { *; } 
-keepclassmembernames class org.objectweb.asm.** { *; } 
-dontwarn org.objectweb.asm.**