Android Project: Proguard Confusion FAQs and Solutions Summary

Source: Internet
Author: User

1. Use the Proguardgui obfuscation to confuse the jar package, which appears EXCEPTION from simulation error :

[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 0000012flocals[0000]: lcom/android/volley/toolbox/basicnetwork ; locals[0001]: lcom/android/volley/request;locals[0002]: jlocals[0003]: <invalid>locals[ 0004]:&NBSP;LORG/APACHE/HTTP/HTTPRESPONSE;LOCALS[0005]:&NBSP;[BLOCALS[0006]:&NBSP;LJAVA/UTIL/MAP;LOCALS[0007]:  ljava/io/ioexception;locALS[0008]:&NBSP;&LT;INVALID&GT;LOCALS[0009]:&NBSP;&LT;INVALID&GT;LOCALS[000A]:&NBSP;&LT;INVALID&GT;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


Workaround: remove-keepattributes localvariable*table This configuration item in the configuration file.

References: Android Project: Obfuscation of the framework, SDK package or jar file library and solutions to common problems


2. Reference library is normal, the code of the library is mixed with jar package after running error unable to execute dex:multiple Dex files define:

Unable to execute Dex:multiple Dex files define Lcom/glblong/socshare/r$anim


Workaround: The project refers to different versions of the jar package, and if the jar package versions in Libs are consistent, the problem may be caused by inconsistencies in the jar package versions introduced when using Proguradgui. That is, in the process of obfuscation, the jar packages introduced are consistent with the jar files used in the project.

References: Android Project: Obfuscation of the framework, SDK package or jar file library and solutions to common problems











Other references:

1.Android Project: Proguard Confusion FAQs and Solutions Summary

2.Android Project: Proguard confusing common open source project obfuscation configuration

3.Android Project: Confusion of the self-framing framework, SDK package, or jar file repository and solutions to common problems




This article from the "Sky no traces but I flew" blog, please be sure to keep this source http://glblong.blog.51cto.com/3058613/1435941

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.