proguard

Proguard error if i use itext Library jar

跟風遠走 提交于 2019-12-21 13:01:48
问题 Proguard won't work with iText library. the errors are related to org.spongycastle.** org.bouncycastle.* and com.itext.pdf.** I have tried to use keep on these packages without success. My proguard config file is this: -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* -optimizationpasses 5 -allowaccessmodification -dontpreverify -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose -keepattributes *Annotation* -keep public class

Run Proguard on multi-module project as “one piece”

对着背影说爱祢 提交于 2019-12-21 11:04:20
问题 TLDR: How to pass proguard mapping to javac to compile against obfuscated library ? That's long, but I don't see how to make it shorter: Background: I have the following product setup: Android Studio project - Library module - (sub)module Core - (sub)module A - (sub)module B - (sub)module C - Sample App module - ... Other modules Each of library submodules A, B, C reference classes in Core, but A, B, C independent among themselves. Conceptually similar to Play Services where user can only

How to fix these proguard warnings

我们两清 提交于 2019-12-21 09:19:00
问题 I am using a third party library in my project, since then proguard is issuing me these warnings, which I can't relate to that library, Here is the library I am using: Lollipin. Warnings I am getting Warning:android.databinding.DataBindingUtil: can't find referenced class android.databinding.DataBinderMapper Warning:android.databinding.ViewDataBinding: can't find referenced class android.databinding.DataBinderMapper Warning:there were 43 unresolved references to classes or interfaces. Warning

Proguard keep parameter names for interface and abstract class

二次信任 提交于 2019-12-21 08:24:28
问题 I am trying to prevent proguard from obfuscating interface (or abstract class) methods parameters. Lets say I have this interface in my lib : package com.mypackage; public interface MyLibListener { void onSomething(boolean success, String message); } And this proguard file : -keepparameternames -keep interface com.mypackage.MyLibListener { *; } Then I assemble release and I get : package com.mypackage; public interface MyLibListener { void onSomething(boolean var1, String var2); } Same thing

Proguard keep parameter names for interface and abstract class

喜欢而已 提交于 2019-12-21 08:24:12
问题 I am trying to prevent proguard from obfuscating interface (or abstract class) methods parameters. Lets say I have this interface in my lib : package com.mypackage; public interface MyLibListener { void onSomething(boolean success, String message); } And this proguard file : -keepparameternames -keep interface com.mypackage.MyLibListener { *; } Then I assemble release and I get : package com.mypackage; public interface MyLibListener { void onSomething(boolean var1, String var2); } Same thing

removing unused assets from 3rd party library

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 08:00:12
问题 I've run into this issue where minifyEnabled and shrinkResources give me sub-optimal results in the sense that; when I have included, 'com.google.android.gms:play-services-places:9.6.1' I am not using Google Sign In API's yet, I get loads of sign in images. How do I get rid of them from my APK? They seem to add a fair bit of KB's. I am using proguard with minify and shrink resources as explained above. 回答1: There is a detail topic here at android developer user guide. Basically, you have lot

Unable to build a release build in Kotlin

允我心安 提交于 2019-12-21 07:15:37
问题 After having converted my Android project to Kotlin I am unable to build a release build, the error appears to be related to Proguard. I see 155 warnings like Warning:com.example.app.activity.MainActivity$1: can't find referenced field 'android.view.View decorView' in program class com.example.app.activity.MainActivity Warning:com.example.app.activity.MainActivity$2: can't find referenced field 'android.os.Handler handler' in program class com.example.app.activity.MainActivity and the build

proguard + crashlytics crash

霸气de小男生 提交于 2019-12-21 06:45:27
问题 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.** { *; }

Android with Gradle and Proguard

拟墨画扇 提交于 2019-12-21 06:25:30
问题 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

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

断了今生、忘了曾经 提交于 2019-12-21 05:58:42
问题 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