17

I made the mistake of upgrading eclipse today and now can't get my a new Android project to get going.

I get the message Proguard.cfg (the file can't be found).

Where is this thing I can't seem to find it? Is it possible to get rid of it I don't need Obfuscation in this project...

Thanks

Tantalus
  • 173
  • 1
  • 1
  • 4

4 Answers4

31

lately the base proguard config is here in the sdk dir - so you only have to put this into your project.properties:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt

if you want to make project-specific modifications, create a proguard-project.txt and change the line to:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 
ligi
  • 39,001
  • 44
  • 144
  • 244
  • 9
    Note to others, you need to literally copy/paste that. I wrongly tried to replace this {sdk.dir} with this C:/Program Files/Android/android-sdk – Simon K Jul 10 '12 at 17:34
15

If you really don't need Proguard to obfuscate your release builds, you can remove the following line from the default.properties file in your project root folder:

proguard.config=proguard.cfg

If you want a proguard.cfg template, you can create a new Android project from scratch with Eclipse's project wizard, then copy proguard.cfg from the new project over to the previous one.

Julio Gorgé
  • 10,056
  • 2
  • 45
  • 60
  • 3
    If you are working from the command line, rather than Eclipse, run `android update project` on the project to create the `proguard.cfg` file. – CommonsWare Dec 14 '10 at 23:02
  • Thanks Julio; It never created the default properties file either, so I switched back to version 1.5 the proguard file appeared. Looks like some kind of bug version 2.3 upgrade...I will try as u suggest. – Tantalus Dec 14 '10 at 23:22
9

cp /android-sdk/tools/proguard/examples/android.pro /android-sdk/tools/lib/proguard.cfg

chavey
  • 91
  • 1
  • 1
  • Google creates so many painful problems to overcome with every update. Suddenly this proguard problem appears out of nowhere. Thanks @chavey, this solves the problem. – aez May 29 '12 at 02:52
9

I just experienced the same problem.

You need to update your SDK tools to current version.

In Eclipse go into your Android SDK and AVD Manager. Select Installed Packages in the left hand tab. Click Update All. Select the SDK tools latest version. Click Install.

After it's done you should have the Proguard.cfg file in your tools/lib/ directory.

Community
  • 1
  • 1
LesterM
  • 162
  • 2