1.使用proguardgui混淆器对jar包进行混淆,出现EXCEPTION FROM SIMULATION错误:
[2014-07-08 14:29:55 - Test024_HouseBox_v02_jar] Dx EXCEPTION FROM SIMULATION: [2014-07-08 14:29:55 - Test024_HouseBox_v02_jar] Dx local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information. [2014-07-08 14:29:55 - Test024_HouseBox_v02_jar] Dx ...at bytecode offset 0000012f locals[0000]: Lcom/android/volley/toolbox/BasicNetwork; locals[0001]: Lcom/android/volley/Request; locals[0002]: J locals[0003]: <invalid> locals[0004]: Lorg/apache/http/HttpResponse; locals[0005]: [B locals[0006]: Ljava/util/Map; locals[0007]: Ljava/io/IOException; locals[0008]: <invalid> locals[0009]: <invalid> locals[000a]: <invalid> stack[0001]: N012bLcom/android/volley/NoConnectionError; stack[top0]: N012bLcom/android/volley/NoConnectionError; ...while working on block 012e ...while working on method performRequest:(Lcom/android/volley/Request;)Lcom/android/volley/NetworkResponse; ...while processing performRequest (Lcom/android/volley/Request;)Lcom/android/volley/NetworkResponse; ...while processing com/android/volley/toolbox/BasicNetwork.class [2014-07-08 14:29:55 - Test024_HouseBox_v02_jar] Dx 1 error; aborting [2014-07-08 14:29:55 - Test024_HouseBox_v02_jar] Conversion to Dalvik format failed with error 1
解决方法:在配置文件中去掉-keepattributes LocalVariable*Table这个配置项。
参考资料:Android项目:自构框架、SDK包或者jar文件库的混淆及常见问题解决方法
2.引用库正常,对库的代码打成jar包混淆后运行报错Unable to execute dex: Multiple dex files define:
Unable to execute dex: Multiple dex files define Lcom/glblong/socshare/R$anim
解决方法:项目引用了不同版本的jar包导致的,如果libs中的jar包版本都是一致的,那么问题可能出现在使用proguradgui时引入的jar包版本不一致导致的。也就是在混淆过程中,引入的jar包要与项目中使用的jar文件一致。
参考资料:Android项目:自构框架、SDK包或者jar文件库的混淆及常见问题解决方法
其他参考资料:
1.Android项目:proguard混淆之常见问题及解决方法汇总
2.Android项目:proguard混淆之常见开源项目混淆配置
3.Android项目:自构框架、SDK包或者jar文件库的混淆及常见问题解决方法
Android项目:proguard混淆之常见问题及解决方法汇总,布布扣,bubuko.com
时间: 2024-10-14 04:48:48