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 % *
Change
Call % java_exe %-jar "% proguard_home %" \ Lib \ proguard. Jar % 1% 2% 3% 4% 5% 6% 7% 8% 9
OK.
Note: QQ technology exchange group: add one if you are interested in 108614806.