android-proguard

proguard + crashlytics crash

此生再无相见时 提交于 2019-12-03 21:55:23
I have integrated Crashlytics in my project, Now when I enable proguard, App Crashes. Have tried to exclude all the classes from crashlytics with no success File proguard-rules.pro file has the following -keep class io.fabric.sdk.android.** { *; } -keep interface io.fabric.sdk.android.** { *; } -keep class com.digits.sdk.android.core.** { *; } -keep interface com.digits.sdk.android.core.** { *; } -keep class com.twitter.sdk.android.** { *; } -keep interface com.twitter.sdk.android.** { *; } -keep class io.fabric.** { *; } -keep interface io.fabric.** { *; } -keep class com.digits.** { *; }

Android build release transformClassesWithDexBuilderForRelease FAILED java.lang.ArrayIndexOutOfBoundsException

∥☆過路亽.° 提交于 2019-12-03 16:19:48
I've updated Firebase (from v15.0.2) and play-services-base (from v15.0.0) to the latest versions. I'm using implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.android.gms:play-services-base:16.0.1' implementation 'com.google.firebase:firebase-config:16.1.0' implementation "com.google.firebase:firebase-messaging:17.3.4" implementation 'com.google.firebase:firebase-ads:17.1.1' dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.google.gms:google-services:3.2.0' } distributionUrl=https\://services.gradle.org/distributions/gradle-4.6

Proguard doesnt preserve the line numbers and method names in stacktrace

六月ゝ 毕业季﹏ 提交于 2019-12-03 13:13:00
Here are few lines from proguard-rules.pro -keepattributes *Annotation* -keepattributes Signature -keepattributes InnerClasses,EnclosingMethod -renamesourcefileattribute SourceFile -keepattributes SourceFile,LineNumberTable -keep public class * extends java.lang.Exception -dontwarn org.apache.http.** Logcat output (error line number is listed as 1133, while my source file is 100 lines longer) 09-04 16:11:46.698 3827-5280/com.XX.main E/AndroidRuntime: FATAL EXCEPTION: IntentService[ActivityRecognizedTracker] Process: com.XX.main, PID: 3827 java.lang.NullPointerException: Attempt to read from

How to upgrade ProGuard for Android?

不问归期 提交于 2019-12-03 10:51:21
I used Android SDK Manager to download the latest version of Android SDK. But ProGuard was not updated and remained at version 4.7. Is it necessary to manually download ProGuard from its website and unzip it to \android-sdk\tools\proguard ? Or will Android SDK always use Version 4.7? It has been this way for 4 years . These days ProGuard is a dependency of the Android Gradle plugin, and is usually updated along with it. Looking at the output of ./gradlew buildEnvironment (supported since Gradle 2.10 ) you will see something like classpath +--- com.android.tools.build:gradle:2.2.3 | \--- com

How to not obfuscate interface methods & its parameters using Proguard in Android?

别等时光非礼了梦想. 提交于 2019-12-03 10:44:55
I have the following code: public class MyClass { public void method1(Integer marks) { } private String method3(String name){ } public interface interface1 { void method4(Integer ID); void method5(Integer rate, boolean status); } } I have used progaurd-rules.pro -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod -keepparameternames -keep public class * -keepclassmembers public class *{ public *; } -keep public interface packageName.MyClass$interface1 { *; } Obfuscated code as below: public class MyClass { public void method1

Android Proguard warning: can't write resource (Duplicate zip entry)

北城余情 提交于 2019-12-03 09:59:29
I enabled proguard and got: Warning:can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [commons-io-2.4.jar:META-INF/LICENSE.txt]) Warning:can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [commons-io-2.4.jar:META-INF/NOTICE.txt]) Warning:can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [commons-collections-3.2.1.jar:META-INF/LICENSE.txt]) Warning:can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [commons-collections-3.2.1.jar:META-INF/NOTICE.txt]) Warning:can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [joda-time-2.7-no

Stack size becomes negative after instruction

这一生的挚爱 提交于 2019-12-03 08:13:29
It has been pointed out that the reason I am having this problem is because of proguard 4.9 , so I went ahead and updated to proguard-5.2.1. But I am still having the same problem. Has anyone found a solution? I confirmed the new version through java -jar /projects/tools/android-sdk-macosx/tools/proguard/lib/proguard.jar and my proguard-rule.pro is simply #---- Google Cloud Endpoint section # Needed by google-api-client to keep generic types and @Key annotations accessed via reflection -keepclassmembers class * { @com.google.api.client.util.Key <fields>; } -keepattributes Signature

When using R8 on Android, do I need to uninstall my existing Proguard?

匆匆过客 提交于 2019-12-03 08:09:58
Do I need to remove Proguard related code from Gradle when using R8? minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' You don't actually remove the proguard rules, as R8 works with Proguard rules in compat mode . For more details, please refer to https://android-developers.googleblog.com/2018/11/r8-new-code-shrinker-from-google-is.html . R8 is available with Android Studio 3.3 beta and works with Proguard rules. To try it, set the following in your project's gradle.properties file: android.enableR8=true But for the full mode , it is

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory

本小妞迷上赌 提交于 2019-12-03 05:20:34
Similar questions have need asked already. But this one seems to be more complicated than previous ones because of changes in compatibility of Android Platforms. Here is my error log from Pixel and Pixel2 which are signed up for Android Beta Program 08-16 13:20:53.146 9630-9630/? E/AndroidRuntime: FATAL EXCEPTION: main Process: me.project.android.dev, PID: 9630 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/LogFactory; at com.amazonaws.util.VersionInfoUtils.<clinit>(VersionInfoUtils.java:41) at com.amazonaws.util.VersionInfoUtils.c(VersionInfoUtils.java:77)

MobileFirst 7.1 Progurd getting Error return code 1

一笑奈何 提交于 2019-12-02 21:42:50
问题 I'm using mobilefirst 7.1 environment in eclipse. I just create sample hybrid application and add android environment. then i take unsigned apk at the time i'm getting below error. kindly help me for this. Thank you :) Progurd-project.txt # 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}