proguard

What does the double asterisk mean in proguard rules?

半世苍凉 提交于 2019-11-30 17:18:04
What does this rule mean in proguard for example: -keep class myjava.** {*;} I understand {*;} part would mean all members and methods in the class. But what does the 2 asterisk mean in the package name?. Thanks in advance. From the manual : Types in classname, annotationtype, returntype, and argumenttype can contain wildcards: '?' for a single character, '*' for any number of characters (but not the package separator), '**' for any number of (any) characters, '%' for any primitive type, '***' for any type, and '...' for any number of arguments. 来源: https://stackoverflow.com/questions/21727162

Proguard warnings despite kept classes

非 Y 不嫁゛ 提交于 2019-11-30 17:17:53
问题 I'm using Proguard to shrink my code. My strategy is to enable it and then follow the warnings to keep anything it complains about. If there are outside libraries, I try to follow the Proguard instructions the authors make available. Many instructions include a -dontwarn flag. If I disable the -dontwarn flag, I will get warnings. If we are keeping most classes via -keep flag, why do warnings still come up? Example: -keep class javax.** { *; } # for butterknife -keep class butterknife.** { *;

Akka on Android multiple reference.conf

馋奶兔 提交于 2019-11-30 15:55:36
问题 I'm trying to add akka and spray to my android app (written in Scala with Scaloid lib). Everything should work fine, my ide is not throwing any errors. I found some links addressing the same problem, but nothing helped me so far. When I build my project with: sbt ~android:install When I have the following line in my build.sbt apkbuildExcludes in Android += "reference.conf" I get the error 08-31 08:02:45.598 7884-7884/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: at.itn.android, PID: 7884

Android Application with android-support-v4.jar added to lib facing error while trying to sign in using proguard in IntelliJ Idea

孤人 提交于 2019-11-30 15:52:07
I am trying to sign my application. Without checking the proguard the Sign in process goes fine. But if I am using the proguard I am getting the following stack trace. I have tried adding: -dontwarn CompatHoneycomb -keep class android.support.v4. { *; } -dontwarn **CompatCreatorHoneycombMR2 -dontwarn **ActivityCompatHoneycomb -dontwarn **MenuCompatHoneycomb lines to progaurd.cfg and also updating the progaurd.cfg by downloading the new version and copy pasting the jars and also have checked for any spaces in project location. None of them seems to work. The applications min sdk version is 9. I

android:onClick not working with ProGuard

淺唱寂寞╮ 提交于 2019-11-30 15:19:39
Since today, something weird is happening with my application. Every time I click a button that has set the android:onClick attribute, I get an IllegalStateException: Could not find a method ... I noticed that only happens when I enable Proguard in the file: default.properties This is my proguard.cfg: -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public

Android - Proguard didn't compile with Joda Time jar file

可紊 提交于 2019-11-30 14:37:06
问题 I used Joda time API in my android project, my project didn't compile when i export a signed apk, it showing the error "Proguard returned with error code 1. See console", below is the error log, [2013-07-20 00:50:25 - CC] Proguard returned with error code 1. See console [2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString [2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateTime: can't find referenced class org.joda.convert

Proguard is saying it can't find any classes

一世执手 提交于 2019-11-30 14:06:11
I'm using proguard with a spring mvc application and maven. My pom.xml's build section looks like: <build> <finalName>myapp</finalName> <plugins> <plugin> <groupId>com.pyx4me</groupId> <artifactId>proguard-maven-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <obfuscate>true</obfuscate> <!--<options>--> <!--<option>-keep public class</option>--> <!--</options>--> <injar>${project.build.finalName}</injar> <injar>${project.build.finalName}</injar> <inFilter>com.myapp.*</inFilter> </configuration

What is the default for minifyEnabled for buildType not explicitly scripted?

删除回忆录丶 提交于 2019-11-30 14:01:49
问题 I imported several eclipse projects to Android Studio (v1.1). In the original Eclipse environment, they use Proguard for release mode. In the Android Studio environment, this was translated to the following in the build.gradle script (by the import, not by me): buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } I understand that this means that "in release build, enable Proguard's minify, using proguard.cfg" . The problem, however, is that minify seems to be happening

Exposing inner classes when obfuscating with ProGuard

南楼画角 提交于 2019-11-30 13:55:19
I'm obfuscating a library with ProGuard using the Ant task. I'm keeping particular class names and their method names when they have a particular annotation (@ApiAll) and I'm requesting that the InnerClasses attribute be kept: <keepattribute name="InnerClasses" /> <keep annotation="com.example.ApiAll"/> <keepclassmembers annotation="com.example.ApiAll"> <constructor access="public protected"/> <field access="public protected"/> <method access="public protected"/> <constructor access="protected"/> </keepclassmembers> If I check the mapping output file I can see that my inner class that has the

Obfuscate private fields using ProGuard

心已入冬 提交于 2019-11-30 12:24:03
问题 I'm using ProGuard in AndroidStudio 1.2.1.1 with Gradle 1.2.3. My Gradle's release build is configured like so: minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' shrinkResources true I would like the private fields of classes to be obfuscated. Here is my proguard config file (after many tries) as of now: -allowaccessmodification -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -renamesourcefileattribute SourceFile