How to automatically generate proguard-android.txt?

Reading all the wonderful things, the new ProGuard Improvements for Android , I switched to a new scheme, uncommenting the following line in the newly created project:

proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt;proguard-project.txt 

But when I try to export this APK project, I am greeted with the following message:

Incorrect path to the proguard configuration file 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, of course, although this directory exists and has subdirectories and even the README file, proguard-android.txt not found anywhere.

By the way, I tried it with : instead ; but that didn’t change anything.

Shouldn't Eclipse + ADT + Proguard automatically generate this file for me? What am I missing?

Also, where can I find the “standard” default rule set for Android proguard-android.txt so that I can copy it to its missing slot?

+5
source share
4 answers

It should either be generated or come with your sdk (I think). However, there is a link to the one that I have (r19 tools). http://pastebin.com/7rNJkns0

+7
source

New projects or old ones converted when changing the API are now in the project.properties file on

 proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 

You can simply link the configuration of proguard projects by commenting out a line and adding

 proguard.config=proguard-project.txt 

.

Greetings.

+2
source

Your expression:

 proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt;proguard-project.txt 

The correct declaration ( : instead of ; ):

 proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 
+1
source

I recommend creating a new project and copying the file proguard-project.txt.

In eclipse, you can do this by choosing File -> New -> Other -> Android -> Android Application Project. This is only in the root directory of the new project.

+1
source

All Articles