After the SDK is upgraded to r_16, the obfuscation program becomes faulty again. Find a solution.

Source: Internet
Author: User

How to upgrade the SDK and ADT will encounter so many problems. After a problem occurs in the jar package, it becomes confusing again.

The following are solutions found on the network, which have been verified to be valid.

The conflicts between compilation and decompilation are complementary. Decompilation is sometimes associated with disgraceful things, so that the compiler often has a hard time thinking and increases the difficulty of decompilation, such as obfuscation.Code. Proguard is such a tool:

The proguard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure name.

The android SDK integrates proguard and uses a chapter in the document to describe how to use it. According to the document, most of them are normal, but sometimes some problems are encountered during use: (that is, some packages cannot be found)

 

According to the previous practice, the occurrence of warning can be ignored. Only when an error is seen can the system be nervous. However, this warning caused the build failed, which is a big problem.

Add the following content to proguard. cfg as prompted:-Dontskipnonpubliclibraryclasses, Try again. There is still a problem.

Find the answer on the official website, manual-> troubleshooting-> "Warning: Can't Find referenced class", and find this sentence:Try your luck with the-ignorewarnings option, or even the-dontwarn option.Then compare the log information and find that:

[Proguard] Warning: net. poemcode. Digest: Can't Find referenced class org. Apache. castleprovider

Open proguard. cfg and add-Dontwarn net. poemcode .**, Package once. '

 

The attachment is the default. properties and proguard. cfg files.

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.