APK packaging and decompilation II. errors reported during proguard Packaging

Source: Internet
Author: User

Try APKCodeObfuscation, the following error occurs during the final packaging:

 
Proguard returned with Error Code 1. see console proguard. parseexception: Unknown option 'and' in argument number 9 at proguard. configurationparser. parse (configurationparser. java: 170) at proguard. proguard. main (proguard. java: 491)

I searched on the Internet. Based on others' experience and methods, the following problems may occur in the following two cases:

1. Current SDK version andProguardThe version is not compatible, and must be upgraded to version 4.6 or above. After the upgrade, the problem can be solved smoothly.

To upgrade proguaed4.7, It is a compressed package:

Http://sourceforge.net/projects/proguard/files/

Upgrade Method:

Decompress the proguard4.6.zip file, overwrite the bin and Lib folders in the [Android SDK installation directory] \ tools \ proguard folder of the same name, and return to eclipse to re-execute the export Android Application to check whether the application is successful. If it fails, restart and try again.

2. The project file name contains spaces

For example, c: \ workspace \ name Android name

You need to modify the project file c: \ workspace \ androidprojectname

 
 

Output after obfuscation:

After obfuscation, A proguard file is generated in the project folder of the workspace, where:

Dump.txt describes the structure of all classes in the APK file.

Mapping.txt lists the name ing between source code and obfuscated fields, such as classes, methods, and fields. When you receive a bug report from a release project (generally, this ing file is used for correct output logs when you connect to the software after debugging obfuscation in eclipse on your mobile phone ), this file is very important. This is because you need to translate the class name, method, and field name after obfuscation stack trace (these are the real names in the source code ).

Seeds.txt lists classes and members that are not obfuscated.

Usage.txt lists the code stripped from the APK file.

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.