android-proguard

Getting error building App: app:transformDexArchiveWithDexMergerForDebug

青春壹個敷衍的年華 提交于 2019-12-22 06:02:24
问题 I get the following error while building the app in android studio, why this is happening? Is it related to my proguard rules or dexguard rules? when I add " multiDexEnabled true" in build.gradle file, I get below error: Error:Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'. > com.android.build.api.transform.TransformException: java.nio.file.NoSuchFileException: D:\android\app\build\intermediates\multi-dex\debug\maindexlist.txt But, when I add " multiDexEnabled true"

Android ProGuard obfuscation of library: keep class not working

我是研究僧i 提交于 2019-12-21 21:25:52
问题 Intro: I have in AS 1 project with 2 models: Android library project with some "Public API class" Android APP dependent on above library (the library module is on the dependency list) Task: I want to obfuscate my library project because I want to expose it as public SDK but keep my code protected... What I did: So I made custom ProGuard rules: -dontshrink -dontoptimize -dontpreverify -keep class com.org.my_public_api_class_name I skip all other stages in order to eliminate where the bug is to

Run Proguard on multi-module project as “one piece”

对着背影说爱祢 提交于 2019-12-21 11:04:20
问题 TLDR: How to pass proguard mapping to javac to compile against obfuscated library ? That's long, but I don't see how to make it shorter: Background: I have the following product setup: Android Studio project - Library module - (sub)module Core - (sub)module A - (sub)module B - (sub)module C - Sample App module - ... Other modules Each of library submodules A, B, C reference classes in Core, but A, B, C independent among themselves. Conceptually similar to Play Services where user can only

Unable to build a release build in Kotlin

允我心安 提交于 2019-12-21 07:15:37
问题 After having converted my Android project to Kotlin I am unable to build a release build, the error appears to be related to Proguard. I see 155 warnings like Warning:com.example.app.activity.MainActivity$1: can't find referenced field 'android.view.View decorView' in program class com.example.app.activity.MainActivity Warning:com.example.app.activity.MainActivity$2: can't find referenced field 'android.os.Handler handler' in program class com.example.app.activity.MainActivity and the build

proguard + crashlytics crash

霸气de小男生 提交于 2019-12-21 06:45:27
问题 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.** { *; }

Proguard doesnt preserve the line numbers and method names in stacktrace

笑着哭i 提交于 2019-12-21 04:08:36
问题 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

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

我只是一个虾纸丫 提交于 2019-12-21 03:32:36
问题 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

How to upgrade ProGuard for Android?

一世执手 提交于 2019-12-21 03:16:07
问题 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. 回答1: 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

How to resolve multiple D8 warnings: <Class X> was not found, it is required for default or static interface methods desugaring <Class Y>?

◇◆丶佛笑我妖孽 提交于 2019-12-20 10:45:43
问题 After upgrading to Android Gradle Plugin from 3.1.4 to 3.2.x I'm getting multiple warnings such as: D8: Type `com.google.gson.reflect.TypeToken` was not found, it is required for default or static interface methods desugaring of `com.google.gson.reflect.TypeToken org.springframework.http.converter.json.GsonHttpMessageConverter.getTypeToken(java.lang.reflect.Type)` D8: Type `com.squareup.okhttp.MediaType` was not found, it is required for default or static interface methods desugaring of `com

Is proguard enough to pass penetration testing?

守給你的承諾、 提交于 2019-12-20 07:48:10
问题 For our android mobile app , we have to choose an obfuscation tool so that our app will pass penetration test cases. Is Proguard enough for the same or we should use Dexguard? 回答1: Obfuscation is NOT enough to pass a penetration test A proper penetration test will analyze both static and runtime behavior of your app, so the runtime behavior will not be covered at all only through obfuscation But also considering exclusively the static analysis that you will undergo you are far from being