Solution to conversion to Dalvik format failed with error 1 error in code obfuscation in Android

Source: Internet
Author: User

In development environments later than Android, Google provides the proguard code obfuscation function (which can be added by yourself before) to protect the hard-to-write code.

The proguard. cfg file will be automatically added to the root directory of the newly created Project for code obfuscation. No matter which version of Android target you have created, it will be automatically added.

When you want to use code obfuscation. add proguard to the properties file. config = proguard. CFG indicates that you want to use code obfuscation. Some simple instructions can be found in the \ docs \ guide \ developing \ tools \ proguard.html file, there are also some precautions for using proguard, which can be found here.

For the old project, you can copy the corresponding proguard. cfg to achieve the same effect.

The "conversion to Dalvik format failed with error 1" error occurred during the obfuscation attempt today. The solutions found on the Internet are not for code obfuscation, later, I finally found the answer to the question in stackoverflow, because the problem with SDK tools reversion12 was reduced to reversion11, so there was no problem. A better solution was also provided:

Find the [Android SDK installation directory] \ tools \ proguard \ bin \ proguard. BAT file and open it in the editor (editplus is used:

Call % java_exe %-jar "% proguard_home %" \ Lib \ proguard. Jar % *


Call % java_exe %-jar "% proguard_home %" \ Lib \ proguard. Jar % 1% 2% 3% 4% 5% 6% 7% 8% 9


Note: QQ technology exchange group: add one if you are interested in 108614806.


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: 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.