android-proguard

How to fix warning 'can't find referenced class' in Android Eclipse ProGuard Rule?

折月煮酒 提交于 2019-11-29 14:20:11
I am using Eclipse. In my Android code, I have used ProGuard. But while exporting the APK, I encountered the following warnings: Proguard returned with error code 1. See console Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning: okio.Okio: can't find referenced class java.nio.file.Files Warning: okio.Okio: can't find referenced class java.nio.file.Files Warning: okio.Okio: can't find referenced class java.nio.file.Files Warning: okio.Okio: can't find referenced class java.nio.file.Path Warning: okio.Okio: can't find referenced

Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it will be empty”

本秂侑毒 提交于 2019-11-29 10:54:19
问题 I'm creating a build with different flavors with Gradle. It used to run quite good until now, until I wanted to enable Proguard . I enabled minifyEnabled for my Release Build and now I'm having an exception saying : " Caused by: org.gradle.internal.UncheckedException: java.io.IOException: The output jar [.../app/build/intermediates/multi-dex/dev/release/componentClasses.jar] must be specified after an input jar, or it will be empty. " Does anybody know what is causing this exception ? I

ProGuard: “java.exe” exited with code 1 after adding ModernHTTPClient

送分小仙女□ 提交于 2019-11-29 08:46:33
In the Xamarin.Forms project I added ModernHTTPClient library and now the ProGuard step breaks with error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2025,3): error MSB6006: "java.exe" exited with code 1. (Previously, I had some issues with ProGuard but was able to get it to work while targeting Android 7.1 by upgrading ProGuard to latest version.) Some of the details from the log file are below. 2> Proguard (TaskId:363) 2> AndroidSdkDirectory: C:\android-sdk\ (TaskId:363) 2> JavaPlatformJarPath: C:\android-sdk

Error building APK when minifyEnabled true

不羁的心 提交于 2019-11-29 07:25:02
I need to enable proguard, so I set minifyEnabled to true. However, I then get the following error when trying to build a release APK: Error:Execution failed for task ':app:packageRelease'. Unable to compute hash of .../app/build/intermediates/classes-proguard/release/classes.jar Edit: Sounds like I need to update my proguard-rules according to the libraries I'm using. Here are my dependencies: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.jakewharton:butterknife:7.0.1' compile 'com

Updating Play services from 8.1 to 8.3 with Proguard enabled

送分小仙女□ 提交于 2019-11-28 21:15:12
I tried to update play services to 8.3. Here's what I changed : In the root gradle file : dependencies { classpath 'com.android.tools.build:gradle:1.5.0-beta1' classpath 'com.google.gms:google-services:1.5.0-beta2' } And in the app gradle file : compile 'com.google.android.gms:play-services-maps:8.3.0' compile 'com.google.android.gms:play-services-location:8.3.0' compile 'com.google.android.gms:play-services-base:8.3.0' compile 'com.google.android.gms:play-services-gcm:8.3.0' compile 'com.google.android.gms:play-services-analytics:8.3.0' compile 'com.google.android.gms:play-services-appinvite

ProGuard: duplicate definition of library class?

回眸只為那壹抹淺笑 提交于 2019-11-28 18:30:46
I run my ProGuard for my Android project and get the following warnings: Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver] Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory] Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException] Note: duplicate definition of library class [org.apache.http.params.HttpParams] Note: duplicate definition of library class [android.net.http.SslCertificate$DName] Note: duplicate definition of library class [android.net.http.SslError] Note: duplicate

Build fails with app:transformClassesAndResourcesWithProguardForRelease on upgrading gradle version to 2.3.3

六月ゝ 毕业季﹏ 提交于 2019-11-28 12:16:40
问题 I have my gradle to 2.3.3. It is working fine in debug mode. But when i am running this in release mode with proguard enabled, It is thorwing this exception Warning:Exception while processing task java.io.IOException: java.lang.NullPointerException Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForProdRelease'. I have checked many solution on stackoverflow like same problem as mine but this solution didn't work On running gradlew assembleRelease --stacktrace

Build fails with app:transformClassesAndResourcesWithProguardForRelease

随声附和 提交于 2019-11-28 12:11:31
I recently updated android studios to version 2.3, build tools to 25.0.2, gradle 2.3.0 and gradle distribution 3.3 and now i am getting this while building the project. Never had this issue with older versions. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55) at org

Hide a library source code

牧云@^-^@ 提交于 2019-11-28 11:43:35
I am developing an android library and I want to hide it's code. I am using other library, and for some of them, when trying to access their code with Android Studio, you only get the list of methods of the class and "/ * compiled code* /" inside. I am using pro-guard, but i can still access the source code of my library. Even if the methods and members names have been modified, the code is still readable and it is possible to read every hard coded strings. How do I hide my code the same way those libraries do ? aha Android Studio replaces the actual code with something like /* compiled code *

Proguard - Can't find common super class of [com/google/android/gms/d/kl]

吃可爱长大的小学妹 提交于 2019-11-28 11:14:56
问题 I am failing to create a release build. Suddenly Android Studio started throwing below error. Unexpected error while performing partial evaluation: Class = [com/google/android/gms/d/lc] Method = [a(Lcom/google/android/gms/d/kk;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/android/gms/d/lh;Lcom/google/android/gms/d/en;Lcom/google/android/gms/d/lb;)Lcom/google/android/gms/d/kn;] Exception = [java.lang.IllegalArgumentException] (Can't find common