proguard

Where to find the warning of `Warnings found during shrinking`?

不想你离开。 提交于 2019-12-23 09:49:49
问题 After adding RxAndroid and Retrofit library to my gradle, and compile, I got the below error, shows in my Android Studio Message panel. Error:Execution failed for task ':app:transformClassesWithNewClassShrinkerForProductionDebug'. > Warnings found during shrinking, please use -dontwarn or -ignorewarnings to suppress them. In my Debug, I use minifyEnabled true useProguard false I believe I could use -dontwarn or ignorewarnings to suprress and let the compilation continue. But I would like to

Proguard with Crashlytics

偶尔善良 提交于 2019-12-23 09:35:14
问题 We have added crashlytics in our android application, and we are using proguard . So, as the crashlytics documentation says, we have added the following code in our proguard configuration file: -keep class com.crashlytics.** { *; } -keep class com.crashlytics.android.** -keepattributes SourceFile,LineNumberTable *Annotation* Unfortunately, when we sign the APK, we get the following error: java.io.IOException: proguard.ParseException: Unknown option '*Annotation*' What are we doing wrong?

Why does ProGuard keep the onCreate() method?

[亡魂溺海] 提交于 2019-12-23 09:06:12
问题 I'm trying to wrap my head around this, but I simply don't understand why this is happening: As per the default proguard.cfg file, I define the following rule: -keep public class * extends android.app.Activity as far as I understand, this means: keep any Activity class as an entry point, but feel free to shrink/obfuscate/optimize anything inside it (otherwise I'd have to use e.g. the <methods> wildcard to preserve methods, too, right?). Now my test Activity looks like this: public class

Proper Proguard configuration to keep static inner class

倖福魔咒の 提交于 2019-12-23 08:55:14
问题 I have the following: public class A extends B { static class C { Object field1; int field2; boolean field3; } } I cannot get the C class via reflection! I've tried the following: -keep class com.path.to._class.A$** {*;} -keep class com.path.to._class.A$* {*;} -keep class com.path.to._class.A$C {*;} -keep class com.path.to._class.A$C { <fields>; } -keep class com.path.to._class.A$C { Object field1; int field2; boolean field3; } None of the above worked. Am I doing something completely wrong

Removing unnessary classes from third party libraries and JARs [duplicate]

人走茶凉 提交于 2019-12-23 07:49:41
问题 This question already has answers here : Java - How to reduce the size of third-party jars to reduce the size of your application (3 answers) Closed 5 years ago . I need to remove unused classes from third party JARs. Why tools should I use? I already tried to use ProGuard. However, it removes only unused classes from the project itself but the library jars - third party - always remain unchanged. 回答1: You can create an uber jar and then use ProGuard. Repackaging library classes into jars

Facebook Audience Network Proguard settings

爷,独闯天下 提交于 2019-12-23 07:40:20
问题 I'm currently using Proguard in my app, and the Audience Network is not working. I need some different configuration, rather than the usual: -keep class com.facebook.** { *; } The problem is the integration guide doesn't refer any kind of Proguard configuration. Does someone already faced this problem and figured out what is missing? 回答1: I need some different configuration, rather than the usual: -keep class com.facebook.** { *; } You need to use -keep class com.facebook.ads.** { *; }

Proguard seeming to remove an entire packages that are included in the path

允我心安 提交于 2019-12-23 07:03:48
问题 I use Proguard to obfuscate my code, and make it smaller. I build using Eclipse, and have for some time. I've recently had a build that works great in the debug version, which I'm trying to release. I've been trying to get this done for most of the last day, and I keep getting the following error when I try to run my code using the released build (I can produce more if it helps). 02-25 16:39:58.844: E/AndroidRuntime(27593): Caused by: java.lang.ClassNotFoundException: Didn't find class "com

How to keep the classes with native functions

允我心安 提交于 2019-12-23 06:04:20
问题 Is it possible to tell the ProGuard to completely skip the class if there is native function in it ? -keepclasseswithmembernames class * { native <methods>; } Above doesn't work for me because it keeps the class names and the native functions names but obfuscates other members I'd like to know if it's possible to keep everything in such classes without explicitly specifying every class Thank you 回答1: Is it possible to tell the ProGuard to completely skip the class if there is native function

How to keep the classes with native functions

馋奶兔 提交于 2019-12-23 06:03:40
问题 Is it possible to tell the ProGuard to completely skip the class if there is native function in it ? -keepclasseswithmembernames class * { native <methods>; } Above doesn't work for me because it keeps the class names and the native functions names but obfuscates other members I'd like to know if it's possible to keep everything in such classes without explicitly specifying every class Thank you 回答1: Is it possible to tell the ProGuard to completely skip the class if there is native function

ResolutionException with Hibernate and JavaFx

戏子无情 提交于 2019-12-23 05:04:08
问题 Im having some issue and I had no luck figuring it out how to fix it. I have a JavaFx Project which has Hibernate and Proguard. But whenever I try to run the task 'runProguard' fails with java.lang.module.ResolutionException. What's puzzling me is the fact that my project doesnt use modules. Is there anyway to fix this? Task :runProguard FAILED Task ':runProguard' is not up-to-date because: Task has not declared any outputs despite executing actions. Starting process 'command ... Successfully