proguard

Meaning of { *; } in ProGuard

笑着哭i 提交于 2020-07-18 09:29:14
问题 Consider this proguard statement : -keep public class * extends android.support.design.widget.CoordinatorLayout$Behavior { *; } In this statement what does the addition of { *; } mean? Does it preserve all methods? All fields? Or just the entire class? 回答1: It is used as a wildcard in ProGuard to indicate all members and methods in the class . Source: ProGuard manual, Stack overflow 来源: https://stackoverflow.com/questions/32455157/meaning-of-in-proguard

Meaning of { *; } in ProGuard

被刻印的时光 ゝ 提交于 2020-07-18 09:28:12
问题 Consider this proguard statement : -keep public class * extends android.support.design.widget.CoordinatorLayout$Behavior { *; } In this statement what does the addition of { *; } mean? Does it preserve all methods? All fields? Or just the entire class? 回答1: It is used as a wildcard in ProGuard to indicate all members and methods in the class . Source: ProGuard manual, Stack overflow 来源: https://stackoverflow.com/questions/32455157/meaning-of-in-proguard

Unresolved class name proguard-rules Android Studio 4.0

倾然丶 夕夏残阳落幕 提交于 2020-07-15 10:05:47
问题 When I update to Android Studio 4.0 proguard-rules it shows warning Unresolved class name . Below is example but I sure it still waring the exist class in my project. -keep class com.squareup.haha.** { *; } -keep class com.squareup.leakcanary.** { *; } If I change from ** to * this warning is gone. -keep class com.squareup.haha.* { *; } -keep class com.squareup.leakcanary.* { *; } Does anyone get this? Should I ignore this warning or it's bug of Android Studio 4.0? Update : I find it's bug,

Duplicate class MultiDex$V14.class

浪子不回头ぞ 提交于 2020-07-09 06:54:18
问题 My Android gradle build is failing during the ProGuard phase with a duplicate class error for MultiDex$V14.class (see below). I understand what a duplicate class is and I know what MultiDex is but I still don't understand how it's a duplicate. Questions: I see one definition is in multidex.jar, of course. How can I tell where the other is defined? Isn't ProGuard supposed to remove duplicate entries instead of complaining about them? The "What went wrong" description at the bottom seems

Android studio 3.4.2 R8 obfuscator does not obfuscate class names, but only java code inside

非 Y 不嫁゛ 提交于 2020-07-06 10:46:31
问题 When I upgraded to the latest Gradle version, my class names are not being obfuscated anymore. The current studio version is 3.4.2 As the latest version uses R8 obfuscation instead of Proguard , I have removed the previous configuration of proguard-rules.pro as it does almost nothing at all. I still use buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } and inside proguard-rules.pro i

Obfuscating the .aar files

柔情痞子 提交于 2020-06-10 12:44:46
问题 I have created the .aar file (containing the resources & drawables) of an Android library project using ./gradlew assemble I have enabled obfuscating by setting minify == true buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } However when I run the mentioned gradle command with minify enabled = true, I get java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options? What does this error

Prevent reverse engineering of ionic application

半腔热情 提交于 2020-05-25 07:03:31
问题 Is there a way to prevent reverse engineering of ionic mobile application? As mentioned in Android forum I've activated proguard and built the application in eclipse. A file called proguard was created in my bin folder. It contained something like this view AndroidManifest.xml #generated:6 -keep class com.fg.lolc.CordovaApp { <init>(...); } But I still could reverse engineer the app and I was able to get the code from my APK. Is there a way to prevent this and improve the security of the

Is there any proguard rules should use while using EncryptedSharedPreferences?

三世轮回 提交于 2020-05-16 22:02:16
问题 before using EncryptedSharedPreferences my app works fine in release mode with (minifyEnabled = true), After adding the security library to my application the app crash while opening and if i use (minifyEnabled = false) the app works fine, i think i missing something to add it in proguard-rules.pro but i have searched a lot did not found anything. 回答1: Looks like something wrong with Tink obfuscation. My current workaround is add this rule to proguard: -keep class com.google.crypto.tink.** {

Is there any proguard rules should use while using EncryptedSharedPreferences?

杀马特。学长 韩版系。学妹 提交于 2020-05-16 22:01:03
问题 before using EncryptedSharedPreferences my app works fine in release mode with (minifyEnabled = true), After adding the security library to my application the app crash while opening and if i use (minifyEnabled = false) the app works fine, i think i missing something to add it in proguard-rules.pro but i have searched a lot did not found anything. 回答1: Looks like something wrong with Tink obfuscation. My current workaround is add this rule to proguard: -keep class com.google.crypto.tink.** {

R8 changes “protected” methods of abstract class to “public” without -allowaccessmodification flag

谁都会走 提交于 2020-05-15 11:47:06
问题 I have an issue with R8. In MyLib I have public abstract MyLibsClass in which I have protected methods. MyChildClass extends from MyLibsClass in MyApp and after R8's magic all protected methods (including protected abstract) in MyLibsClass are changed into public ones, and of course in MyChildClass I'm getting "attempting to assign weaker access privileges ('protected'); was 'public') issue as trying to override protected abstract methods. Additional info gradle-6.0.1 MyLib's build.gradle