android-proguard

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' while generating APK

怎甘沉沦 提交于 2019-12-06 14:09:41
问题 I have generated an APK of my Android application (as a try) and I did not have any problem, the APK has been generated correctly. Now, I want to obfuscate my code while generating the APK so I used the following line on my release block on build.gradle file. minifyEnabled true The problem is that now it throws me the following error: Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Please correct the above warnings first. with a

Android app doesn't work after published it by generate signed app

孤人 提交于 2019-12-06 14:05:37
问题 I create an app and it work on emulator. It works on debug apk on device, but when I build it with generate signed app it doesn't work? what is wrong and how I can debug it on device on signed sate? 回答1: In my project doesn't run signed app. I changed minifyEnabled value from true to false then problem is solve . this bad solution. I'm looking for a better way. build.gradle : buildTypes { release { shrinkResources true minifyEnabled false //true proguardFiles getDefaultProguardFile('proguard

Unable to Build Release Apk Android Studio 3.0.1 Proguard-Rules

穿精又带淫゛_ 提交于 2019-12-06 11:53:46
I am trying to build the release apk of my app but I am unable to do so. I have built this app before using the old gradle and android studio I think it was version 2.3.3. I updated everything to version 3.0.1 and I am unable to build the app anymore. I tried reverting but it still cause the execution to fail, something about my proguard. The message: Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. Job failed, see logs for details My progurd-rules.pro -dontwarn okio.** -dontwarn com.yalantis.ucrop** -keep class com.yalantis.ucrop** { *; } -keep

Class no longer obfuscated after upgrading to Android Gradle plugin 3.4.0

眉间皱痕 提交于 2019-12-06 09:33:36
After upgrading to Android Gradle plugin 3.4.0, a basic class no longer gets obfuscated. The following basic steps can reproduce the problem: In Android Studio create a new empty project In app/build.gradle change minifyEnabled to true Create the following class, ProguardTestClass.java : public class ProguardTestClass { public interface ProguardTestInnerInterface { void proguardTestCallback(String message); } public static void proguardTestMethod(String input, ProguardTestInnerInterface impl) { impl.proguardTestCallback("proguardTestMethod received input=[" + input + "]"); } } Refer to the

Android Library module use proguard

三世轮回 提交于 2019-12-06 04:52:46
I want to create secure library module that no one can extract code from apk file. but when try to enable proguard in library gradle getting error package does not exists. then i add following line in proguard rules file -keep class com.alprocr.** { *; } -keep class com.xyz.alpr.** { *; } -keep class com.xyz.alpr.doc.** { *; } after add this code app working file. but when i extract code from apk using apktool then i got complete source code from apk file. I want non-readable code when someone try to extract apk file. Is it possible? i also try to allow shrinkresource but getting same error

Proguard unresolved references to classes

谁说胖子不能爱 提交于 2019-12-06 04:07:35
When building apk using Proguard, I see theses Warnings: com.google.android.gms.internal.zzaq: can't find referenced class com.google.android.gms.internal.zzzk com.google.android.gms.internal.zzaq: can't find referenced class com.google.android.gms.internal.zzzk$zza com.google.android.gms.internal.zzaq: can't find referenced class com.google.android.gms.internal.zzzk com.google.android.gms.internal.zzaq: can't find referenced class com.google.android.gms.internal.zzzk$zza com.google.android.gms.internal.zzaq: can't find referenced class com.google.android.gms.internal.zzzk$zza com.google

How to remove Log.d() calls in release build of an Android app?

試著忘記壹切 提交于 2019-12-06 03:38:37
I have noticed that my release build, which i made in eclipse via: Android Tools -> Export signed application package ... My proguard-project.txt contains: -assumenosideeffects class android.util.Log { public static boolean isLoggable(java.lang.String, int); public static int v(...); public static int i(...); public static int w(...); public static int d(...); public static int e(...); } Yet, if I run the app on a device und use CatLog to look at logs I see that there are all the Log.d(), Log.v() messages that shouldn't be there. Is there something else I should set? I have spent many hours

How to inspect proguard process, so I know what takes so long?

依然范特西╮ 提交于 2019-12-06 01:41:07
My release build is stuck on :android:transformClassesAndResourcesWithProguardForRelease for 10 minutes. Gradle console does not print anything. How do I make it print what proguard is doing, so I know where the problem could be? You need to add the following to your proguard configuration file: -verbose Additionally, you need to enable info logging for your gradle build via gradle -i <target> where target is the actual task your are running (most likely assembleRelease). Then you will see more output and what ProGuard is currently doing. Based on experience, the optimization step can take a

Proguard causing runtime exception with Android Navigation Component

荒凉一梦 提交于 2019-12-05 21:48:20
问题 I'm experiencing this crash when using proguard after integrating the NavigationComponent ( android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha01 ) into my project with target and compile sdk of 27 2018-05-16 12:13:14.044 24573-24573/com.mypackage.myapp.x E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mypackage.myapp.x, PID: 24573 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mypackage.myapp.x/com.mypackage.myapp.MainActivity}: android.view

Proguard with Autovalue

感情迁移 提交于 2019-12-05 21:00:02
问题 I have just started using AutoValue but I am unable to make it work with proguard. I have around 6000+ warnings that look like this Warning:autovalue.shaded.com.google.common.auto.common.MoreElements$1: can't find superclass or interface javax.lang.model.util.SimpleElementVisitor6 The actually errors shows this... Error:Execution failed for task ':transformClassesAndResourcesWithProguardForDebug'. java.io.IOException: Please correct the above warnings first. How can i resolve this issue? 回答1: