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
12
votes
2 answers

Do I need to 'keep' Parcelable in proguard rules while obfuscating

My Project has few classes that extends Parcelable. Do I need to 'keep' them in proguard rules while obfuscating. What is the general practice for parcelables?
vijay_t
  • 776
  • 6
  • 14
12
votes
4 answers

transformClassesAndResourcesWithProguardForRelease' error in Android

Hi I am struggling to create release version for my project. I have been try lot of things on Progaurd through SO / Google help but I am still not able to create the release version. Can somebody help me with this? I always get this…
Sanjana Nair
  • 2,663
  • 6
  • 26
  • 44
12
votes
3 answers

Android Cling/Upnp proguard

I have created app using Cling and is working fine but when I create release build I get following message and nothing plays on renderer: 11-22 16:24:53.341 20172-20172/? I/RendererCommand﹕ TrackMetadata : TrackMetadata [id=1,…
ingsaurabh
  • 15,249
  • 7
  • 52
  • 81
12
votes
2 answers

mapping.txt file is not getting generated when using Proguard

I am facing issue while obfuscating my app using proguard. I am able to use proguard and it is generating mapping.txt when i am creating a new application in android studio, however mapping.txt is not being generated when i am trying to use proguard…
11
votes
3 answers

Proguard issues with Gradle 3.0.0

I'm trying to create an APK using ProGuard and the new Gradle 3.0.0 version. I'm getting a lot of warnings on classes that I thought I ignored in my ProGuard configuration file. The same configuration works well with Gradle 2.3.3 but seems to break…
11
votes
3 answers

Android proguard issue: path may not be null or empty string. path='null'

Every thing work fine before setting minifyEnabled true and shrinkResources true After setting these values, whenever i run project i get this error: Information:Gradle tasks [:app:assembleProdRelease] Error:path may not be null or empty…
Rishabh Chandel
  • 725
  • 1
  • 11
  • 28
11
votes
2 answers

Cannot create tasks to upload Proguard Mapping File.java.lang.IllegalStateException: Resolving configuration 'androidTestAnnotationProcessor'

Upgraded to Android Studio 3.0 canary 3 and with it gradle-4.0-milestone-1-all Due to the new way of evaluating dependencies the current plugin used in https://firebase.google.com/docs/crash/android#uploading_proguard_mapping_files_with_gradle no…
appbootup
  • 9,537
  • 3
  • 33
  • 65
11
votes
5 answers

ProGuard for Android and Retrofit2 Converter Gson?

i am using ProGuard in my project but its giving wrong data in new Gson().toJson(Request); i am getting out put {"a":"manage","b":"689184d4418b6d975d9a8e53105d3382","c":"10","d":"76"} instead…
praj
  • 849
  • 1
  • 16
  • 39
11
votes
1 answer

minifyEnabled true leads to crash on app start

Unfortunately XX has stopped. I receive this message as soon as I start my productive app, when I set buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' …
Chris
  • 4,255
  • 7
  • 42
  • 83
11
votes
2 answers

Proguard doesnt obfuscate Class name, only methods are obfuscated

I try using Proguard in android studio, but seems like Proguard is not obfuscating the class name, for example, my app structure, and the config: and config but when i try trigger the exception in the app: the exception is listed in ADB…
Qing
  • 1,401
  • 2
  • 21
  • 41
11
votes
3 answers

NullPointerExcepetion Facebook sdk v4.5.0 when enable Proguard (when try to login using Parse library)

I'm trying to login with Facebook using ParseFacebookUtils library and it's working good but when i enabled the Proguard file i have this exception on Facebook login activity startup: Fatal Exception: java.lang.RuntimeException: Unable to start…
11
votes
2 answers

android.support.v8.renderscript error on ProGuard

I am using Blurry when I do ProGuard it gives me: Error loading RS jni library: java.lang.UnsatisfiedLinkError: android.support.v8.renderscript.l: Error loading RS jni library: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in…
andro
  • 1,007
  • 1
  • 14
  • 32
11
votes
1 answer

The use of assumenosideeffects in ProGuard

I read from http://proguard.sourceforge.net/manual/usage.html about the use of assumenosideeffects. My question refers to the following paragraph: -assumenosideeffects class_specification Specifies methods that don't have any side effects…
Monica Marcus
  • 187
  • 2
  • 10
11
votes
2 answers

ProGuard build fail "Unresolved references"

I've been working on the newest version of my app and it tests just fine, but when I do a release ProGuard build, I get many errors, mostly about not being able to find org.apache.http.*, which I do not use in my project. I have searched my entire…
NSouth
  • 5,067
  • 7
  • 48
  • 83
10
votes
1 answer

Multi Feature Instant Apps can't be proguarded?

By using Android Studio 3.0 Beta 5, using the default Project (Empty Activity) with Instant Apps on. To turn on Proguard, I just set all the Build.Gradle (app, base and feature) with debug { minifyEnabled true proguardFiles…
Elye
  • 53,639
  • 54
  • 212
  • 474