android-proguard

Android proguard, keep inner class of Inner class

久未见 提交于 2019-12-05 18:22:36
Parent question: Android proguard, keep inner class My problem is with inner class of inner class One of the SDKs in my android project has a class A, which has two static inner class. They are found to be stripped after applying proguard. public class A{ .... static class B{ ... static class D { .... } } static class C{ ... } } My proguard looks like this -keepattributes Exceptions, InnerClasses -keep class com.xxx.A -keep class com.xxx.A$* Which prevents class B, C from proguard. But no luck with class D. I have tried -keep class com.xxx.A$** as well. I think you're missing the Class

Too many method references in android library project - ClassNotFoundException

梦想与她 提交于 2019-12-05 17:46:51
I have library project which I am using in main android project using AAR file. I am getting the famous 65k method limit now which I have expected, but I have few queries. I have added AAR file in libs folder of my main project and compiled the same in build.gradle. 1) Do I need to add multi-dex support in both library as well as main android project? 2) Do I need to add afterEvaluate script in both project? Most importantly if we got multi-dex working, we might get issue that in main android project we get Classnotfound exception if any of the class which we try to use is not in main dex list

Proguard - also use proguard files from modules

妖精的绣舞 提交于 2019-12-05 05:32:58
My projects build.gradle looks like following: android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "..." minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile project(':androKnife') } And my androKnife module does have it's own proguard file. How can I make my main project use this file as well? Is there some way to auto merge all proguard files of all modules, if I compile a project? Is

what is the difference between -keep class and -dontwarn

放肆的年华 提交于 2019-12-05 03:58:15
Hey I'm new with proGuard , I use it to protect my code from reverse engineering , but when I built my signed apk I got a lot of errors when I enabled proGuard ,I have googled my problem I've found answers that says use -dontwarn for the classes that showing in the error message but after seeing the documentation from proGuard it says If you don't feel like filtering out the problematic classes, you can try your luck with the -ignorewarnings option, or even the -dontwarn option. Only use these options if you really know what you're doing though. and I don't know what I'm doing and here is my

Several new Proguard issues Google Play services v10.2.6 to v11.0.0 in a Multidex project

本秂侑毒 提交于 2019-12-05 02:57:26
I updated our app to use the most recent Android Firebase SDK v11.0.0 ( https://firebase.google.com/support/release-notes/android#20170607 ) and out of the suddenly we bunch of new proguard errors appear, FYI everything was working well before with proguard. Before: compile 'com.google.firebase:firebase-messaging:10.2.6' compile 'com.google.android.gms:play-services-vision:10.2.6' After: compile 'com.google.firebase:firebase-messaging:11.0.0' compile 'com.google.android.gms:play-services-vision:11.0.0' The issue is that it doesn't seem to be a simple new missing proguard entry, but it seems

Signed apk getting crashed in proguard enable

瘦欲@ 提交于 2019-12-05 02:19:48
I am trying to use proguard in my app set the proguard to true and then the problem starts I am importing lib when I use proguard by following this -keepnames class com.somepackage.* with my package name the app is getting getting crashed when I try to use the signed apk. I know this iS a dumb question but I am stuck at this for last 5 hr not able to find an easy solution as I am using about 20 lib. I followed this also . Plz guide me in this how can I do this? This is my proguard rule class code -keepnames class beatbox.neelay.dummybeat.* -keepnames com.srx.widget.* -keepnames de.hdodenhof

Android build release transformClassesWithDexBuilderForRelease FAILED java.lang.ArrayIndexOutOfBoundsException

霸气de小男生 提交于 2019-12-05 01:09:42
问题 I've updated Firebase (from v15.0.2) and play-services-base (from v15.0.0) to the latest versions. I'm using implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.android.gms:play-services-base:16.0.1' implementation 'com.google.firebase:firebase-config:16.1.0' implementation "com.google.firebase:firebase-messaging:17.3.4" implementation 'com.google.firebase:firebase-ads:17.1.1' dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' while generating APK

半城伤御伤魂 提交于 2019-12-04 19:06:53
I have generated an APK of my Android application (as a try) and I did not have any problem, the APK has been generated correctly. Now, I want to obfuscate my code while generating the APK so I used the following line on my release block on build.gradle file. minifyEnabled true The problem is that now it throws me the following error: Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Please correct the above warnings first. with a lot of warnings. To be more exact, 1018 warnings. Most of them are like: Warning:com.itextpdf.text.pdf

Android: How to generate signed APK with minifyEnabled

百般思念 提交于 2019-12-04 18:39:00
I have an android app, I just finished working on it and am ready to publish it on PlayStore. However, to avoid someone else from directly decompiling it, I wanted to add the proguard layer of security. I tried to generate signed apk after setting minifyEnabled to 'true'. However, android studio started showing several errors, at one point the count went beyond 800 errors. I tried searching for a solution online and got to know the main cause of this problem might be all the third party libraries I had added to my application. One of the most popular solution to overcome this type of problem

Android proguard issue: path may not be null or empty string. path='null'

心已入冬 提交于 2019-12-04 18:02:41
问题 Every thing work fine before setting minifyEnabled true and shrinkResources true After setting these values, whenever i run project i get this error: Information:Gradle tasks [:app:assembleProdRelease] Error:path may not be null or empty string. path='null' Information:BUILD FAILED Information:Total time: 23.606 secs Information:1 error Information:0 warnings Information:See complete output in console What does this error means Error:path may not be null or empty string. path='null' Here is