I have enabled proguard in project.properties:
proguard.config=proguard.cfg
My proguard.cfg does not disable obfuscation. But nothing is obfuscated.
I run the project build with
ant release.
Any bells ringing?
-optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/,!class/merging/
-keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * { native ; }
-keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet); }
-keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet, int); }
-keepclassmembers class * extends android.app.Activity { public void *(android.view.View); }
-keepclassmembers enum * { public static *[] values(); public static * valueOf(java.lang.String); }
-keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }
You should make sure that your project is configured for your Android SDK:
android update project -p MyProjectDirectory
As of Android SDK r20, the ProGuard configuration file is split into several parts, which are specified in project.properties
:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
The short project-specific configuration is defined in proguard-project.txt
(no longer in proguard.cfg, like it was in older versions of the SDK). The SDK documentation may not be entirely up to date in this respect.
When you run ant release
, you should see some logging output from ProGuard.
@Thanks Danail, Today i just overcome from this problem .Just elaborating
android:debuggable
Whether or not the application can be debugged, even when running on a device in user mode — "true"
if it can be, and "false" if not. The default value is "false".
For more details you can visit
http://www.vogella.com/tutorials/AndroidDebugging/article.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With