android-proguard

crash with NoSuchMethodError after proguard with method references

风流意气都作罢 提交于 2019-12-01 16:04:45
the source code before compile&proguard : public class IntentSession extends BaseIntentSession { @Override public void onResume() { super.onResume(); mExecutor.exec(getIntent(), this::finish); } } the decompiled code after compile&proguard : (Decompiled with CFR 0_118) public class a extends superA { public void e() { super.e(); this.c.a(this.j(), b.a((a)this)); // the problematic code here } } now is the key code after compile&proguard, the b class's decompiled code : final class b implements c.a { private a a; b (a a1) { this.a = a1; } static /* synthetic */ b a(final a a) { return new b(a);

Proguard - PersistenceException: Constructor not matched for class

坚强是说给别人听的谎言 提交于 2019-12-01 15:59:15
问题 I am using retrofit2.0 in my app with simpleframework.xml library. The problem is when I run the app without proguard it works fine however when I run proguard I get the following Error in logs. E/ERROR: java.lang.RuntimeException: org.simpleframework.xml.core.PersistenceException: Constructor not matched for class A The class A has no/default constructor which should work. Still I added a No Argument Constructor . But that didn't rectify the issue. Class A @Root(name = "data",strict = false)

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

China☆狼群 提交于 2019-12-01 15:23:45
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 activity ComponentInfo{my.package.name/com.facebook.FacebookActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471) at android.app.ActivityThread.access$900(ActivityThread.java:175) at android.app.ActivityThread$H

Proguard minifyEnabled true for debug build, not working on pre-Lollipop

不问归期 提交于 2019-12-01 14:18:28
问题 The methods count of my app is higher than the 64k limit, so I'm using Proguard to reduce it. Everything works fine for release builds. Debug builds, on the other hand, are successful only for Lollipop+ devices. When launching on pre-Lollipop devices I always have the infamous error: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536 This is what I have in the app level gradle file: buildTypes { debug { minifyEnabled true proguardFiles getDefaultProguardFile(

How to fix Proguard issue with Google Drive REST API

核能气质少年 提交于 2019-12-01 14:01:06
I'm using the Google Rest API v3 to connect my android app to Google Drive. When I run without Proguard (minifyEnabled=false), all is well. However, when I enable proguard the wrong REST API methods are called. When I call Drive.Files.get().execute on the drive root alias "root" I get the result for a Drive.Files.list().execute. When I disable "minifyEnabled" I see the correct result. Here is the section of the build.gradle that controls running Proguard: buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug {

How to fix Proguard issue with Google Drive REST API

久未见 提交于 2019-12-01 12:03:39
问题 I'm using the Google Rest API v3 to connect my android app to Google Drive. When I run without Proguard (minifyEnabled=false), all is well. However, when I enable proguard the wrong REST API methods are called. When I call Drive.Files.get().execute on the drive root alias "root" I get the result for a Drive.Files.list().execute. When I disable "minifyEnabled" I see the correct result. Here is the section of the build.gradle that controls running Proguard: buildTypes { release { minifyEnabled

Why some package-private classes are not obfuscated by Proguard?

拟墨画扇 提交于 2019-12-01 07:54:54
Working with an Android project in Android Studio 3.2, having enabled Proguard and some specific rules, I'm not able to figure out the following: a specific package (and its subpackages) in a library module, used by client code, is preserved through the rule: -keep public class com.mylib.mypackage.** { public protected *; } Now, within this package there are also a number of package-private classes, which should not be picked by that rule. Some of those classes are effectively obfuscated, both in their own names and their member names, which is fine. Instead there are some classes,

Android ProGuard how to hide/obfuscate source code of exported library

。_饼干妹妹 提交于 2019-12-01 06:30:44
I'm developing Android library and I want to hide/obfuscate the source code implementation of the library. The way the user project app will use the library is: startActivity( new Intent(context, LibraryActivityName.class) ); So I need to keep just the name of entry point Activity inside the library project, That's all. When I used the default ProGuard settings: buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } as well as the suggested example for library - Nothing happened, and by clicking on the Activity name

Android ProGuard how to hide/obfuscate source code of exported library

柔情痞子 提交于 2019-12-01 05:34:03
问题 I'm developing Android library and I want to hide/obfuscate the source code implementation of the library. The way the user project app will use the library is: startActivity( new Intent(context, LibraryActivityName.class) ); So I need to keep just the name of entry point Activity inside the library project, That's all. When I used the default ProGuard settings: buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } as

Proguard obfuscation issues after adding new Google Sign In to Android application

梦想的初衷 提交于 2019-11-30 20:01:26
In the new Google Play Services library (8.3.0) there is a new way to perform sign-in. This method involves adding the following dependencies: build.gradle (app level): classpath 'com.google.gms:google-services:1.4.0-beta3' And on app level: compile 'com.google.android.gms:play-services-auth:8.3.0' `apply plugin: 'com.google.gms.google-services'` When creating a release app version with minifyEnabled set to false , the app is being released and works fine. However, when creating a release version with minifyEnabled set to true the app crashes on startup with the following exception: java.lang