I\'ve updated to the new adt&sdk 20, and I\'m having problems with the new way Proguard is being used on Eclipse. I\'m not a pro with Proguard at all, yet I\'ve always u
The path of default config file has been changed to
${sdk.dir}/tools/proguard/proguard-android-optimize.txt
Ok , the solution is that for some reason , I had the wrong location set for sdk.dir variable on eclipse.
So what I did is to:
- Go to eclipse's preferences
- Searched for variables
- And went to java->build path->classpath variables
- And added "sdk.dir" variable with the value of the directory of android sdk .
If it was working fine before and you haven't learnt Proguard, just change this line:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
to this line:
proguard.config=proguard.cfg
then you'll have your old Proguard setup back, I'd recommend updating though, it should just work unless your using some 3rd party jars? These are what is it saying is missing and you should use the -keep flag to stop Proguard from removing them when it obfuscates.
create a file proguard.cfg in your project root folder and update your adt to 21 and use proguard v4.8 or 4.9 and dont forget to run Android Lint before exporting APK
Using SDK 22, my solution was to copy proguard-project.txt from ${sdk.dir}/tools/proguard/ into my project workspace.
If you look at project.properties, you see that it references ${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
.
It found ${sdk.dir} just fine, but was looking for proguard-project.txt in the project directory.