proguard

proguard causing EnumMap NPE on dynamically declared method

匿名 (未验证) 提交于 2019-12-03 00:58:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm adding obfuscation via proguard/maven to a java application as we prepare it for distribution. During the process, it errors out with: Note: ...eventlib.EventManager accesses a declared method 'getHandlerList()' dynamically It then lists a dozen classes with that method with Maybe this is... and it recommends using -keep to avoid the problem. When I do add -keep public class my.package.info.eventlib.HandlerList { *; } to the build process, the error goes away, but I see the following notices: [proguard] Note: the configuration keeps the

Proguard error with fresco

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using ProGuard and when I am running the project in release configuration, I get the following error: Warning:com.facebook.imagepipeline.bitmaps.DalvikBitmapFactory: can't find referenced field 'android.graphics.Bitmap$Config BITMAP_CONFIG' in program class com.facebook.imagepipeline.nativecode.Bitmaps I searched everywhere but couldn't find any clue to solve it. I have updated my proguard-rules.pro with what is given in the fresco's docs page. Fresco dependency: compile 'com.facebook.fresco:fresco:0.8.1+' compile 'com.facebook.fresco

How to properly quote a path in an ant task?

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to call the <proguard> task in Ant and need to pass it the paths to various JAR files, e.g. the equivalent of: <proguard> -injars /some/path/jar1;/some other path/jar2 </proguard> Problem is, some of these path may contain spaces or special characters, they have to be quoted like this as explained in the proguard manual : <proguard> -injars /some/path/jar1;"/some other path/jar2" </proguard> It doesn't work to quote the whole argument, the individual paths need to be quoted separately. The ant file I'm modifying uses properties to

Is it possible to use proguard with Grails

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Even if it is not possible to use proguard for an entire grails app would it be possible to just use it for the src/java folder? 回答1: I don't know either Proguard or Grails in depth, but I do know that: Grails uses Groovy Groovy compiles down to bytecode Proguard operates on bytecode (not source code) Thus my intuition is yes, ProGuard can shrink/obfuscate grails apps. Your question asks about using ProGuard on the src/java folder. It's important to understand that ProGuard operates on .class files, not .java files. A correct configuration

UnsatisfiedLinkError (com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid)

匿名 (未验证) 提交于 2019-12-03 00:48:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Error occurred in running app in device: java.lang.UnsatisfiedLinkError: Native method not found: com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid:(Ljava/lang/String;)Z at com.esri.core.runtime.LicenseImpl.nativeIsClientIdValid(Native Method) at com.esri.core.runtime.LicenseImpl.a(Unknown Source) at com.esri.android.a.b.b(Unknown Source) Related code: import com.esri.android.runtime.ArcGISRuntime; public class MainActivity extends FragmentActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks { @Override protected void

Working maven obfuscate example

杀马特。学长 韩版系。学妹 提交于 2019-12-03 00:44:47
I just want to obfuscate simple maven java app. I use maven-proguard-plugin. All classes main/java must be obfuscated. I try different configs with no luck. The last is: <build> <plugins> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugin</artifactId> <version>2.0.6</version> <dependencies> <dependency> <groupId>net.sf.proguard</groupId> <artifactId>proguard-base</artifactId> <version>4.10</version> <scope>runtime</scope> </dependency> </dependencies> <executions> <execution> <phase>package</phase> <goals><goal>proguard</goal></goals> </execution> </executions>

remove unused classes with proguard for Android

喜欢而已 提交于 2019-12-03 00:42:41
History/Context I have a project[1] where size really matters - recently I moved stuff to a shared lib[2] and thought proguard will take care and remove the unused classes because I had a config that was drastically reducing the size but by using the lib i came over the magic 100kb mark so I investigated: classes which I do not use for sure are in the resulting dex file - and even with full name ( not shortened to single-char ) - e.g. I see the SquareView in the dex which I in no way use in the App. Question Surprisingly I found in the proguard documentation the following: The library jars

How to obfuscate everything but public method names and attributes with proguard?

China☆狼群 提交于 2019-12-03 00:29:42
I'm building an android framework and I need to obfuscate and shrink the jar to ship it to users. I'm using the proguard tool included in the android SDK and I have the following requirements for the output jar: keep all the classes included in the input jar, but obfuscate them. don't obfuscate the class names of the classes called in the `AndroidManifest.xml don't obfuscate the class name and public method names/attributes for the class that is used has an interface for the user, however do it for their contents. To do so, I use the following configuration : -optimizationpasses 5

Android ProGuard: Most Aggressive Optimizations

妖精的绣舞 提交于 2019-12-03 00:29:31
问题 Android's official proguard documentation shows two primary optimizations: set minifyEnabled to true use proguard-android-optimize.txt instead of proguard-android.txt Are these two the most aggressive possible settings? I am writing an android library and need to make sure when people use my library that my code doesn't break. (I know there are rules I can put in my library to counter the proguard configuration set on the app that uses the library, but I don't want to do that if I don't have

What are the ProGuard rules for Firebase?

瘦欲@ 提交于 2019-12-03 00:27:18
What are the ProGuard rules for these dependencies? compile 'com.google.firebase:firebase-core:10.0.1' compile 'com.google.firebase:firebase-crash:10.0.1' compile 'com.google.firebase:firebase-messaging:10.0.1' compile 'com.google.firebase:firebase-ads:10.0.1' Firebase uses the consumerProguardFiles feature to automatically include the appropriate ProGuard if you're using Gradle, meaning you don't need to manually include anything. If you need to manually apply the proguard rules, you can extract the proguard.txt file from each AAR file. 来源: https://stackoverflow.com/questions/41538619/what