Android obfuscation file proguard. cfg

Source: Internet
Author: User

Several exceptions often occur after a third-party jar package is added:

Proguard returned with error code 1.See console


Case 1:
Proguard returned with error code 1. See console
Error: C:/Documents (the specified file cannot be found)
Later, it was found that the entire project was placed on the desktop, and the desktop directory was C:/Documents and Settings/Administrator/desktop, where there was a space, when proguard is used for sending and compiling, spaces are not allowed.
If the correct path is not easy to use, simply delete proguard.

Note: It is best not to have a space character in the SDK and program path.

Case 2:

Proguard returned with error code 1. See console
Exception:

Java. lang. ArrayIndexOutOfBoundsException

Solution: Change "-dontpreverify" in proguard. cfg to "-dontoptimize"

Reference: http://groups.google.com/group/android-developers/browse_thread/thread/eca3b0f5ce6ad00f

 


I deleted the proguard folder generated in the project (the folder is empty at this time), and then re-run the project, it will be OK.

 

Case 3:

[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 [proguard. ClassPathEntry @ 106082] (No such file or directory)

[13:22:32-ZMKSMarket_Build_v1.0] at proguard. InputReader. readInput (InputReader. java: 230)

[13:22:32-ZMKSMarket_Build_v1.0] at proguard. InputReader. readInput (InputReader. java: 200)

[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.exe cute (InputReader. java: 100)

[13:22:32-ZMKSMarket_Build_v1.0] at proguard. ProGuard. readInput (ProGuard. java: 195)

[2011-010-21 13:22:32-ZMKSMarket_Build_v1.0] at proguard.ProGuard.exe cute (ProGuard. java: 78)

[13:22:32-ZMKSMarket_Build_v1.0] at proguard. ProGuard. main (ProGuard. java: 499)

 

The cause of this exception is that the reference path of the third-party jar is incorrect and the obfuscation jar package to be ignored is not found.

 


From WAF demon

Related Article

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.