Pableras84
Pableras84

Reputation: 1195

ProGuard is not working

i am developing an Android APP with the lastest SDK. I'm developing the app for Api 4 (android 1.6).

My project haves a proguard-project.txt file (this is the proguard config file for the lastest versions of Android SDK) and the project.properties file haves uncomented the line for proguard, so proguard is activated (proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt)

the problem is that i compiled the apk file with proguard, and it seems that proguard is doing nothing in the file, i decompiled the apk and shows the same code than when proguard is not used. Also my proguard-project.txt is empty. It only contains comments...

this is the content of my autogenerated proguard-project.txt file:

    # To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

Wich lines i must add to this file for obfuscate, optimize and reduce the size of my apk file? (at least will be fine to obfuscate the code...)

Thanks

Upvotes: 1

Views: 964

Answers (1)

Eric Lafortune
Eric Lafortune

Reputation: 45648

The Android SDK only applies ProGuard when you create a release build, with ant release or by exporting the apk in Eclipse.

Upvotes: 2

Related Questions