Enabling Proguard in Eclipse for Android

Enabling ProGuard in Eclipse for Android

just a follow-up because I was searching for the same thing - and the answers here are outdated - 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 

code obfuscation in android with proguard

to work with proguard you need to just enable proguard using gradil script .

open gradil file and enable minifiable true and try to sign your application

How to configure proguard for Android application using Google Drive SDK?

Use the following in your proguard-google-api-client.txt to preserve the required attributes and class members.

-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault

-keepclassmembers class * {
@com.google.api.client.util.Key <fields>;
}

-keep class com.google.** { *;}
-keep interface com.google.** { *;}
-dontwarn com.google.**

# Needed by google-http-client-android when linking against an older platform version
-dontwarn com.google.api.client.extensions.android.**

# Needed by google-api-client-android when linking against an older platform version
-dontwarn com.google.api.client.googleapis.extensions.android.**

How to install Proguard in Eclipse Juno for Android

From the documentation here:

ProGuard is integrated into the Android build system, so you do not have to invoke it manually. ProGuard runs only when you build your application in release mode, so you do not have to deal with obfuscated code when you build your application in debug mode. Having ProGuard run is completely optional, but highly recommended.

To enable proguard you will need to export your application. File->Export->Android->Export Android Application. The resulting apk is obfuscated and ready for deployment in play store.



Related Topics



Leave a reply



Submit