CommonMan
CommonMan

Reputation: 3928

proguard not running in android "ant release"

I read the android documentation for using proguard that says "if we specify proguard.config property it will run proguard " However I have specified this property, to confirm i checked this in echoproperties but still my files are not obfuscated. I am not sure if I am missing something. Any help is appreciated.

Thanks, Manan

Upvotes: 2

Views: 2675

Answers (4)

Mustafa Güven
Mustafa Güven

Reputation: 15744

here are the steps

  1. Enable the proguard.config in project.properties file

    enter image description here

  2. create proguard-project.txt file, it should be shown as below

    enter image description here

  3. run "ant release"

Upvotes: 0

Vaiden
Vaiden

Reputation: 16122

My guess is that you're using Eclipse. Simply add the following line to your project.propeties file:

proguard.config=proguard.cfg

Upvotes: 0

Code Droid
Code Droid

Reputation: 10472

The documentation on android.developer.com about proguard is not complete. You may also need to set

android:debuggable="false" 

in the AndroidManifest.xml file

I found that I needed to do this in addition to specifying the config file in project.properties

Then after running ant release it will run proguard. The manual only says that android debug will not generate proguard, but it does not make it clear that you cannot even have debuggable set to true.

Upvotes: 3

user1254025
user1254025

Reputation:

Check this link.it will help you about Proguard and how to build [Proguard]

ANT build for Android Proguard obfuscation

Upvotes: 0

Related Questions