Recent use of the project for the obfuscation of Android, the project added a number of third-party jar packages, directly using the project.properties in the proguard.config=${sdk.dir}/tools/proguard/ Proguard-android.txt:proguard-project.txt is obfuscated, the APK is packaged with the Proguard returned with error code 1.See console, Surfing the internet to find out the cause of such problems, the main introduction of three ways, respectively, is error:c:/documents (the system cannot find the specified file), Java.lang.ArrayIndexOutOfBoundsException and jar file path can not be found, for these three cases of project review, there is no such problem, the last article said may be Proguard version is too low, so go to proguard website download Click Open Chain The latest proguard, and configure the Proguard-project.txt related parameters to solve the problem, the detailed process is as follows
First, download the latest proguard on the Proguard website, unzip the file to overwrite the three jar packages under the Lib folder to \sdk\tools\proguard\lib, restart ADT, Set the obfuscation statement proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.tx in the Project.Properties file. Secondly, the configuration proguard-project.txt, according to log information, in the Proguard-project.txt to remove the confusion of related items-dontwarn com.google.android.xx.**, Re-packaging apk for confusion
The following three questions mentioned in the above narrative, the article quoted from http://www.cnblogs.com/0616--ataozhijia/p/3730746.html
Several exceptions that often occur after adding a third-party jar package:
Proguard returned with error code 1.See console
Scenario 1:
Proguard returned with error code 1. See console
Error:c:/documents (the system cannot find the specified file)
Later found because the entire project was put on the desktop, and the desktop directory is c:/documents and settings/administrator/desktop, in which there are spaces, and proguard to compile the time is not allowed to have spaces
If the correct path is not good enough, delete Proguard directly.
Note: The SDK and program paths are best not to have whitespace
Scenario 2:
Proguard returned with error code 1. See console
Abnormal:
Java.lang.ArrayIndexOutOfBoundsException
Workaround: Change "-dontpreverify" in Proguard.cfg to "-dontoptimize"
I delete the Proguard folder (which is empty at this time) in the project and then run the project again, OK.
Scenario 3:
[2011-10-21 13:22:32-zmksmarket_build_v1.0] Proguard returned with error code 1. See console
[2011-10-21 13:22:32-zmksmarket_build_v1.0] java.io.IOException:Can ' t read [[email protected]] (No such file or Directo Ry
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Inputreader.readinput (inputreader.java:230)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Inputreader.readinput (inputreader.java:200)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Inputreader.readinput (inputreader.java:178)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Inputreader.execute (inputreader.java:100)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Proguard.readinput (proguard.java:195)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Proguard.execute (proguard.java:78)
[2011-10-21 13:22:32-zmksmarket_build_v1.0]
At Proguard. Proguard.main (proguard.java:499)
The reason for throwing such an exception is that the reference path of the third-party jar is incorrect, and the jar package that needs to be ignored is not found.
Android confusion occurs when Proguard returned with error code 1.See console issue