android-proguard

Reduce apk size android

不想你离开。 提交于 2019-12-20 01:14:29
问题 I am facing a problem with app size in android. The scenario is, I developed my android app in Android Studio 2.0 and the size of apk was 23 MB. After that, I upgraded my IDE to android studio 2.2 and with little code modification the size of apk boosted to 51 MB. I tried with prorogued and Lint but no advantage. Can Someone help me to tackle the issue. 回答1: 1) Replace all of Images,Icons with vector drawable 2) Turn on pro guard like following goto build.gradleapp level and put these lines *

crash with NoSuchMethodError after proguard with method references

℡╲_俬逩灬. 提交于 2019-12-19 16:30:08
问题 the source code before compile&proguard : public class IntentSession extends BaseIntentSession { @Override public void onResume() { super.onResume(); mExecutor.exec(getIntent(), this::finish); } } the decompiled code after compile&proguard : (Decompiled with CFR 0_118) public class a extends superA { public void e() { super.e(); this.c.a(this.j(), b.a((a)this)); // the problematic code here } } now is the key code after compile&proguard, the b class's decompiled code : final class b

parse.com not working after proguard

牧云@^-^@ 提交于 2019-12-19 10:16:15
问题 I'm using Parse.com features in my app, everything works great on debugging mode. As soon as I generate a signed apk in release mode, I have a killing wait sometimes up to 10 seconds at the beginning of opening my app. most probably it's because of Parse.com trying to initialize and contact its servers, which apparently is not successful. And also, parse.com stops working I know so, since no data would be uploaded into my account. There should be a problem with Proguard of course since the

Why some package-private classes are not obfuscated by Proguard?

被刻印的时光 ゝ 提交于 2019-12-19 09:27:20
问题 Working with an Android project in Android Studio 3.2, having enabled Proguard and some specific rules, I'm not able to figure out the following: a specific package (and its subpackages) in a library module, used by client code, is preserved through the rule: -keep public class com.mylib.mypackage.** { public protected *; } Now, within this package there are also a number of package-private classes, which should not be picked by that rule. Some of those classes are effectively obfuscated,

Proguard obfuscation issues after adding new Google Sign In to Android application

怎甘沉沦 提交于 2019-12-19 02:31:30
问题 In the new Google Play Services library (8.3.0) there is a new way to perform sign-in. This method involves adding the following dependencies: build.gradle (app level): classpath 'com.google.gms:google-services:1.4.0-beta3' And on app level: compile 'com.google.android.gms:play-services-auth:8.3.0' `apply plugin: 'com.google.gms.google-services'` When creating a release app version with minifyEnabled set to false , the app is being released and works fine. However, when creating a release

Android Room Persistence Library Proguard Configuration

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 16:58:19
问题 I am using Android Room Persistence Library 1.0.0-alpha5. When compiling with ProGuard I am getting the following error. Warning:android.arch.persistence.room.paging.LimitOffsetDataSource: can't find superclass or interface android.arch.util.paging.CountedDataSource Warning:android.arch.persistence.room.paging.LimitOffsetDataSource: can't find referenced class android.arch.util.paging.CountedDataSource Warning:android.arch.persistence.room.paging.LimitOffsetDataSource$1: can't find referenced

How to fix warning 'can't find referenced class' in Android Eclipse ProGuard Rule?

前提是你 提交于 2019-12-18 08:27:33
问题 I am using Eclipse. In my Android code, I have used ProGuard. But while exporting the APK, I encountered the following warnings: Proguard returned with error code 1. See console Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning: okio.Okio: can't find referenced class java.nio.file.Files Warning: okio.Okio: can't find referenced class java.nio.file.Files Warning: okio.Okio: can't find referenced class java.nio.file.Files

Xamarin proguard.ParseException: Unknown option '' in line 1 of file 'Properties/proguard.cfg'

假如想象 提交于 2019-12-18 06:45:49
问题 I'm trying to use proguard with Xamarin. So I enabled it in project options (checked Enable ProGuard ), and I created a file proguard.cfg in Properties, (as new Text file, is it right?) and checked the BuildAction -> ProguardConfiguration The proguard file contains only a -keep configuration, with a comment. Whether I leave or remove the comment, I always get a parse error on line 1 : # test comment -keep class !android.support.v7.view.menu.**, !android.support.design.internal.NavigationMenu,

Xamarin proguard.ParseException: Unknown option '' in line 1 of file 'Properties/proguard.cfg'

*爱你&永不变心* 提交于 2019-12-18 06:45:48
问题 I'm trying to use proguard with Xamarin. So I enabled it in project options (checked Enable ProGuard ), and I created a file proguard.cfg in Properties, (as new Text file, is it right?) and checked the BuildAction -> ProguardConfiguration The proguard file contains only a -keep configuration, with a comment. Whether I leave or remove the comment, I always get a parse error on line 1 : # test comment -keep class !android.support.v7.view.menu.**, !android.support.design.internal.NavigationMenu,

Error building APK when minifyEnabled true

旧街凉风 提交于 2019-12-18 05:05:17
问题 I need to enable proguard, so I set minifyEnabled to true. However, I then get the following error when trying to build a release APK: Error:Execution failed for task ':app:packageRelease'. Unable to compute hash of .../app/build/intermediates/classes-proguard/release/classes.jar Edit: Sounds like I need to update my proguard-rules according to the libraries I'm using. Here are my dependencies: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12'