Reading all the wonderful things the new ProGuard Improvements for Android do, I switched to to the new scheme by uncommenting the following line in a newly created project:
proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt;proguard-project.txt
But when I try to export this project's APK, I am greeted with the following message:
Invalid proguard configuration file path C:\android-sdk-windows\tools\proguard\proguard-android.txt does not exist or is not a regular file
Well, I checked the directory C:\android-sdk-windows\tools\proguard
and, sure enough, while this directory exists and has subdirectories and even a README file, proguard-android.txt
is nowhere to be found.
BTW, I tried it with :
instead of ;
but that didn't seem to change anything.
Isn't Eclipse+ADT+Proguard supposed to generate this file automatically for me? What am I missing?
Also, where can I find a "standard" default set of rules for Android proguard-android.txt so that I can copy it over to its missing slot?
ProGuard is a tool to help minify, obfuscate, and optimize your code. It is not only especially useful for reducing the overall size of your Android application as well as removing unused classes and methods that contribute towards the intrinsic 64k method limit of Android applications.
The getDefaultProguardFile('proguard-android. txt') method obtains the default ProGuard settings from the Android SDK tools/proguard/ folder. The proguard-android-optimize. txt file is also available in this Android SDK folder with the same rules but with optimizations enabled.
The getDefaultProguardFile() refers default file “proguard-android. txt” which gets from the Android SDK tools/proguard/ folder. You can also use “proguard-android-optimize. txt” file for more code shrinking located on the same folder.
It should either be generated or come with your sdk (I think). However, here is a link to the one that I have (tools r19). http://pastebin.com/7rNJkns0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With