proguard

android release apk bigger than debug apk

醉酒当歌 提交于 2019-12-04 00:15:36
问题 I'm using proguard to reduce my apk size. The debug apk reduce from 90mb to 55mb, but the signed apk is 71mb. Here is my build.gradle code: apply plugin: 'com.android.application' android { signingConfigs { XXXX { keyAlias 'xxxx' keyPassword 'xxxx' storeFile file('/Users/xxxx.jks') storePassword 'xxxxxx' } } compileSdkVersion 23 buildToolsVersion "24.0.2" defaultConfig { applicationId "com.xxxx" minSdkVersion 14 targetSdkVersion 22 versionCode 61 versionName "4.1.8.1" multiDexEnabled true

How to set up ProGuard for Amazon IAP?

99封情书 提交于 2019-12-03 22:53:37
I'm trying to set up a basic ProGuard with Amazon IAP integrated. However when I'm trying to export my APK, I got the following errors: [2012-06-17 10:59:44 - sc] Proguard returned with error code 1. See console [2012-06-17 10:59:44 - sc] Unexpected error while performing partial evaluation: [2012-06-17 10:59:44 - sc] Class = [com/amazon/inapp/purchasing/KiwiResponseHandler$PurchaseResponseHandlerRunnable] [2012-06-17 10:59:44 - sc] Method = [run()V] [2012-06-17 10:59:44 - sc] Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [java/lang/String] (with 4 known

Proguard and XStream with omitField() on Android

瘦欲@ 提交于 2019-12-03 22:22:23
I was using XStream for deserialization of xml in my Android app, and now I'm struggling to add Proguard (obfuscator) to the mix. Here's the runtime exception I run into (full: pastebin ): WARN/System.err(6209): net.lp.collectionista.util.a.g: XStream could not parse the response WARN/System.err(6209): at net.lp.collectionista.a.s.a(Collectionista:215) ... WARN/System.err(6209): Caused by: com.thoughtworks.xstream.converters.ConversionException: id : id in loader dalvik.system.PathClassLoader[/data/app/net.lp.collectionista-2.apk] : id : id in loader dalvik.system.PathClassLoader[/data/app/net

App works perfectly on 1.6, but why am I getting java.lang.VerifyError on Xperia X10 running 1.6?

孤人 提交于 2019-12-03 22:11:44
My app works perfectly on both emulated and real 1.6 devices. However The Sony Xperia X10 series (running 1.6) is crashing with a java.lang.VerifyError. This thread leads me to believe ProGuard optimization could be the culprit, but if that were the case wouldn't the problem exist on every device running 1.6, instead of just the X10? Here is the stack trace: java.lang.VerifyError: com.twocell.walkabout.Animator at com.twocell.walkabout.Main.void onCreate(android.os.Bundle)(SourceFile:197) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) at android.app

proguard + crashlytics crash

此生再无相见时 提交于 2019-12-03 21:55:23
I have integrated Crashlytics in my project, Now when I enable proguard, App Crashes. Have tried to exclude all the classes from crashlytics with no success File proguard-rules.pro file has the following -keep class io.fabric.sdk.android.** { *; } -keep interface io.fabric.sdk.android.** { *; } -keep class com.digits.sdk.android.core.** { *; } -keep interface com.digits.sdk.android.core.** { *; } -keep class com.twitter.sdk.android.** { *; } -keep interface com.twitter.sdk.android.** { *; } -keep class io.fabric.** { *; } -keep interface io.fabric.** { *; } -keep class com.digits.** { *; }

Android with Gradle and Proguard

廉价感情. 提交于 2019-12-03 21:33:59
I'm just created a new Android Library project using Gradle and would like the code to be optimized and obfuscated with via Proguard. Here is the android portion the build.gradle file: android { compileSdkVersion 19 buildToolsVersion "19.0.1" defaultConfig { minSdkVersion 14 targetSdkVersion 19 versionCode 1 versionName "1.0" } release { runProguard true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt' } } When I run the gradle build command from terminal it fails at :library:proguardRelease with the message: * What went wrong: Execution failed for

What does the double asterisk mean in proguard rules?

我的梦境 提交于 2019-12-03 20:42:41
问题 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. 回答1: 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,

android:onClick not working with ProGuard

不问归期 提交于 2019-12-03 20:14:06
问题 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

How to keep javadoc visible after obfuscating

旧街凉风 提交于 2019-12-03 18:15:55
问题 I built a nice Javadoc documentation for my project which is a JAR file for developers. But after I run proguard in order to obfuscat my code all the Javadoc documentation are gone. I would like to keep javadoc on all my public methods in the jar. Does anyone know how keep Javadoc visible after obfuscating? Thanks! 回答1: Javadoc is extracted from source files . It is not possible to create javadoc from class files , neither clean nor obfuscated. ProGuard operates on the class files created

Android Studio - ProGuard “java.io.IOException …bin\classes (No such file or directory)”

时间秒杀一切 提交于 2019-12-03 18:02:14
问题 So I am running ProGuard for the first time and I am getting a weird error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:proguardRelease'. > java.io.IOException: Can't read [C:\Users\Some\workspace\MyApp\app\bin\classes] (No such file or directory) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Here is my gradle: apply plugin: 'android' android { compileSdkVersion 19