Questions tagged [android-proguard]

The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer.

The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer. Because ProGuard makes your application harder to reverse engineer, it is important that you use it when your application utilizes features that are sensitive to security like when you are Licensing Your Applications.

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.

Official Documentation

1030 questions
0
votes
1 answer

Stuck with proguard while migrating from Retrofit 2.0.0 beta4 to 2.0.1

I was trying to migrate from Retrofit 2.0.0-beta4 to 2.0.1 but the proguard text shows a bug in it . The for the text that i have added is: -dontwarn retrofit2. -keep class retrofit2.** { *; } -keepattributes Signature -keepattributes…
0
votes
1 answer

Can't generate signed apk from Android Studio “Execution failed for task ':packageRelease'” when using JodaTime in some classes

I am using Android Studio 1.2.2 and tried to generate APK with proguard setting. Also I am using joda-time-2.7.jar in my app. This brings me following error message. Error:Execution failed for task ':app:packageRelease'. Unable to compute hash of…
Terance Wijesuriya
  • 1,928
  • 9
  • 31
  • 61
0
votes
1 answer

ListView not behaving normally after updating proguard

I just updated proguard-rules.pro and noticed that ListView is not behaving normally, now ListView items are not appearing. I added these two lines: -keep class com.google.android.libraries.** { *; } -keep class android.support.v7.** { *; } I am…
Oreo
  • 2,586
  • 8
  • 38
  • 63
0
votes
1 answer

proguard errors with AndroidAsync

I have used AndroidAsync library in my android project. Now compiling my project in release mode fails because of proguard warnings issued: ... [proguard] Note: duplicate definition of library class…
user273084
  • 151
  • 7
0
votes
1 answer

android retrace proguard (build api 23)

I recently started using proguard in my project. I created test crash (in App class) I received next error - 03-23 10:12:26.030 4956-4956/social.game.dating E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException at…
Anton Kizema
  • 1,072
  • 3
  • 13
  • 27
0
votes
1 answer

Android - Cannot find Application class after activating proguard

After activating proguard for my android aplication in android studio, the app crashes with error says cannot find Mypackage.Application class. MyApplication classs extends MultiDexApplication. Here is the error I got and below is my…
user5510211
  • 297
  • 1
  • 3
  • 13
0
votes
0 answers

Getting Exception in YouTubeAndroidPlayerApi jar after enabling the proguard

I am using YouTubeAndroidPlayerApi in my project to play the youtube video through the Video ID. Everything works fine but except the issue that am facing while after enabling the proguard minifyEnabled true in my build.gradle. Please find my…
Chandru
  • 5,954
  • 11
  • 45
  • 85
0
votes
0 answers

Android Proguard: Keep Classes but obfuscate class names

I am unable to both keep some classes with proguard but still obfuscate their names. I also want to keep an Interface and their method names and also keep all implementations of this interface with the correct name. What I have tried: -keep public…
Display name
  • 2,697
  • 2
  • 31
  • 49
0
votes
1 answer

Errors while signing apk with proguard

I am trying to generate a signed apk with proguard ON. I have the following line the build.gradle for the proguard buildTypes { release { minifyEnabled true proguardFiles…
MobileAppDeveloper
  • 1,048
  • 2
  • 16
  • 27
0
votes
0 answers

java.util.zip.ZipException: while overriding a file/class from a gradle dependency

In one of the android projects, I'm using Picasso, Glide, OkHttp etc libraries. Now, I'm seeing a few crashes happening in these library codes. I've fixed the code but I had to include the library code into my android project as a modular…
avin
  • 459
  • 5
  • 14
0
votes
0 answers

Adding additional ProGuard files to the Project View of Android Studio

I change my ProGuard configuration depending upon the gradle build type. I do this so that I can magically disable certain code when creating a release build. Example builds: buildTypes { debug { minifyEnabled true proguardFiles…
Knossos
  • 15,802
  • 10
  • 54
  • 91
0
votes
2 answers

Migration from Eclipse to Android Studio: Proguard errors with libraryjars

I have done migration of Eclipse project to Android Studio. I have used three module and following jar files as library in My Project. build.gradle with dependencies: apply plugin: 'com.android.application' android { compileSdkVersion 22 …
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
0
votes
1 answer

Android - Proguard stripping away Parcelable Creator

I have a library project which has Proguard rules on it. These are stated below -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keepclassmembers class * implements…
sha
  • 1,410
  • 2
  • 18
  • 37
0
votes
0 answers

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'

buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } When I make proguard to my app. I get following Error: Error:Execution failed for task…
Zarma Mokana
  • 71
  • 2
  • 10
0
votes
1 answer

Unable to create release build after adding play services(with proguard)

After I added compile 'com.google.android.gms:play-services-gcm:7.+' to my project I can't generate release apk anymore. Also, my Proguard_rules.pro is below: -keepclassmembers class fqcn.of.javascript.interface.for.webview { public *;} -keep class…
Zahra.HY
  • 1,684
  • 1
  • 15
  • 25