Search code examples
androidadtproguard

How to automatically generate proguard-android.txt?


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?


Solution

  • 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