proguard

Android Archive (AAR) package obfuscation

心已入冬 提交于 2019-12-13 04:56:52
问题 I'm setting obfuscation rules for a library project (AAR file). All the rules are respected. However, all the package names aren't obfuscated. The default behavior for the obfuscation is that all package names are obfuscated, are there any special rules to obfuscate package names? 来源: https://stackoverflow.com/questions/30356498/android-archive-aar-package-obfuscation

App crashes on production but not in development

柔情痞子 提交于 2019-12-13 04:37:23
问题 I just launched my brand new app on Google Play but its crashing when i try to open it. The thing is, it used to work just fine in development. I have ProGuard enabled and i tried disabling it, generating the signed apk and manually installing it on a device.. but my app still won't open. Since i have Crittercism enabled, after a few tries, i finally got a crash to be reported to the website, and it says: Unable to start activity ComponentInfo{com.pizzapp.android/com.pizzapp.android.login

I am using -repackageclasses 'my.pdt.z' option of proguard plugin, but obfuscated files still exist in other folders as well

半腔热情 提交于 2019-12-13 04:31:47
问题 I am using following options with proguard plugin. I expect all obfuscated class to be in 'com.xProject.z' folder but I find them spread in other folders as well. Does somebody know why? <options> <option>-repackageclasses 'com.xProject.z'</option> <option>-dontshrink</option> <option>-dontoptimize</option> <option>-dontskipnonpubliclibraryclassmembers</option> <option>-dontskipnonpubliclibraryclasses</option> <option>-keepattributes</option> <option>-keepclasseswithmembers public class *

Proguard causing NoSuchMethodException

爷,独闯天下 提交于 2019-12-13 04:23:52
问题 Class<?> c = Class.forName("co.uk.MyApp.dir.TargetClass"); Method main = c.getDeclaredMethod("main", Report_Holder.class); Throws a 'java.lang.NoSuchMethodException.main[class co.uk.MyApp.classes.Report_Holder]' error once I've prepared the app for release using Proguard. I spent hours thinking the problem was in 'co.uk.MyApp.dir.TargetClass', commenting out things, re-releasing the app, and re-testing. But it turns out that the error is right at the root, at: Method main = c

How to keep my test methods with proguard.cfg

早过忘川 提交于 2019-12-13 02:51:38
问题 For my Android instrumentation test I need a few extra entry point into my classes. Those methods are not used in the actual application. My idea was to start them all with test_ and have a general rule to exclude them from being optimized away. This is how far I got: -keepclassmembers class com.xxx.**.* { public ** test_* (); public ** test_* (**); public static ** test_* (); public static ** test_* (**); } But it still does not work. public static void test_destroy (final android.content

Release apk not working after enabling proguard, not able to debug too [duplicate]

别来无恙 提交于 2019-12-13 02:15:04
问题 This question already has answers here : Google Drive API doesn't play well with ProGuard (NPE) (6 answers) Closed 4 years ago . I am able to install the app in the device, but the app is not connecting to server . I am unable to debug the release apk too. When I disable proguard, the app gets connected to the server and I am able to debug the release apk too. I tried using proguard versions 4.7,4.9 and 5.2.1 . My Android version is 19 and my tools version is 20. I am using eclipse. I have

can't find referenced method in class with Proguard

不问归期 提交于 2019-12-13 01:25:59
问题 when i execute obfuscation using proguard i get this error : can't find referenced method 'javax.servlet.servletContext getServletContext()' in class javax.servlet.http.httpServletRequest i tried to include the servlet-api from tomcat7 , but still the same problem . any help ? 回答1: Ignoring your lowercase/uppercase typos in the error message, this can only mean that ProGuard is somehow using Servlet 2.5 or older in the classpath. This method was introduced in Servlet 3.0. So the concrete

Android Proguard failing with “Value 'i' is not a reference value”

假装没事ソ 提交于 2019-12-13 00:15:54
问题 I recently added a library to my app ('GNSDK' by Gracenote) and am now trying to build the app for release using Proguard. I successfully built and installed the release version of the app once, but all subsequent attempts produce this error: Unexpected error while evaluating instruction: Class = [com/gracenote/gnsdk/GnManager] Method = [<init>(Landroid/content/Context;Ljava/lang/String;I)V] Instruction = [87] getfield #120 Exception = [java.lang.IllegalArgumentException] (Value "i" is not a

Obfuscating Android Library Project source code with ProGuard

浪子不回头ぞ 提交于 2019-12-12 22:19:29
问题 I am developping an Android Library Project with Eclipse that I want to licentiate. To prevent my clients to easily reverse-engineer and read my code, I want to obfuscate the source code of my library. From the research I did, I found that ProGuard seems to be conciderated the best for my usage. I've seen a post from Eric Lafortune (ProGuard's creator) that tells that library projects don't run ProGuard, and this is confusing me. Why would it work with Android Application Projects and not

Specifying serialized names in java class for firestore document

会有一股神秘感。 提交于 2019-12-12 19:23:49
问题 I am trying to store a document in firestore in my android app using a custom object. If I am using proguard for building my app, is there a way to specify the serialized name for the fields inside my class like the way Gson provides using @SerializedName annotation? 回答1: You can specify the name a Java property gets in the JSON of the document with the PropertyName annotation. For example: public class Data { @PropertyName("some_field_name") public String someFieldName } If you use getters