proguard

Proguard Android using Action Bar Sherlock

邮差的信 提交于 2019-12-03 17:33:53
EDIT 4: I've tried taking out Action Bar Sherlock and Proguard did it ok. So I guess it is a problem with android-support-v4.jar. I tried this when including the ABS library, but it didn't work.. -keep class android.support.v4.app.** { *; } -keep interface android.support.v4.app.** { *; } -keep class com.actionbarsherlock.** { *; } -keep interface com.actionbarsherlock.** { *; } -keepattributes *Annotation* Finally, What is weird is that I tried without the ABS library and without proguard-android.txt and it worked as well. I have no clue of what the problem is. I've read tons of Q/A about

MixPanelAPI NoClassDefFoundError

我是研究僧i 提交于 2019-12-03 17:25:17
I'm struggling with java.lang.NoClassDefFoundError when invoking com.mixpanel.android.mpmetrics.MixpanelAPI It is because I run proguard (I have to). However I added proguard exclusion: -keep public class com.mixpanel.android.mpmetrics.** or -keep public class com.mixpanel.android.mpmetrics.MixpanelAPI { *; } but it doesn't help. Notice worth mentioning is that I get MixpanelAPI lib in that way: compile "com.mixpanel.android:mixpanel-android:4.0.0@aar" So it's aar , not standard jar . How to run it with proguard but not loosing Mixpanel code ? As of version 4.5, Mixpanel advises using the

Android build release transformClassesWithDexBuilderForRelease FAILED java.lang.ArrayIndexOutOfBoundsException

∥☆過路亽.° 提交于 2019-12-03 16:19:48
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.google.gms:google-services:3.2.0' } distributionUrl=https\://services.gradle.org/distributions/gradle-4.6

ProGuard Performance - Will ProGuard make my software faster?

假装没事ソ 提交于 2019-12-03 16:07:26
Does anyone have experience in using ProGuard and are there already measurements about application performance beyond the class loading time? I have a fairly complex application that could need a boost, but preparing it for ProGuard would take a few days, so I would like to hear some opinions before. The main benefit, from our experience, is that it can protect your intellectual rights. In terms of class loading time, we are not necessarily seeing any benefit and if so is negligible. One other thing is we have seen issues where it can affect your code negatively. Certainly, retest your

Obfuscating method with throws clause

不打扰是莪最后的温柔 提交于 2019-12-03 15:20:22
问题 I'm using ProGuard to obfuscate my code. My project is comprised of a few modules, each obfuscated independently. One library includes an interface; public interface IFace { public int methodA(boolean b) throws CustomException; } Another library provides an implmentation public class IFaceImpl implements IFace { @Override public int methodA(boolean b) throws CustomException { return 0; } } The library with the interface is built first, and the second is built against the obfuscated version.

Obsolete proguard file; use -keepclasseswithmembers instead of -keepclasseswithmembernames

这一生的挚爱 提交于 2019-12-03 14:40:53
问题 I am having the following error on proguard.cfg file in my android project. I dont know what this error says. Any idea? 回答1: Try with Clean and build your project then select the error marker in the Problems view and press Delete. see the following link http://groups.google.com/group/android-developers/browse_thread/thread/7606320e664fec9b 回答2: This is a bug with the SDK tools v11. http://code.google.com/p/android/issues/detail?id=16384 When Lint generates error, go to lint warnings view

How to turn off all Android ProGuard features except obfuscation?

和自甴很熟 提交于 2019-12-03 14:14:51
问题 Google is suggesting that developers might want to obfuscate byte code: http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html I followed Google's instructions to get an obfuscated Android app that, at first glance, seemed to work. But there were some strange bugs introduced that are not in the un-obfuscated app. I kept turning off ProGuard options to get to this configuration: -dontoptimize -dontshrink -dontusemixedcaseclassnames

Android proguard obfuscated code is causing NullPointerException when it really shouldn't be

此生再无相见时 提交于 2019-12-03 14:11:26
I have distributed an application on the Android Marketplace. I am getting error reports back in from a small handful of users (maybe 2%) where they are getting NullPointerExceptions where it doesn't make logical sense. I have never been able to replicate this myself. The code is relatively straightforward and is a common code path that EVERY user has to follow. I've actually taken every separate line of code that could possibly be creating the NPE and wrapped it in a try-catch block and throw a custom runtime exception, but I'm still getting NullPointerException errors not caught. At this

Problems with OrmLite and proguard obfuscation

↘锁芯ラ 提交于 2019-12-03 13:58:37
问题 When I use Proguard on project with OrmLite. I recieve this error : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.package.name/com.package.name.activities.StartActivity}: java.lang.IllegalStateException: Could not find OpenHelperClass because none of the generic parameters of class class com.package.name.activities.StartActivity extends OrmLiteSqliteOpenHelper. You should use getHelper(Context, Class) instead. I've tried all recomendation from Proguard with OrmLite on

Android ProGuard +MultiDex causes ClassNotFoundException

心已入冬 提交于 2019-12-03 13:57:40
I have MultiDex enabled in my android project. It was working fine until I tried enabling proguard. I can successfully build the project but I get runtime exception on startup. It's unable to find the Application class and the MainActivity . I had the same problem before enabling MultiDex . Now I guess for some reason the MultiDex is not working properly with ProGuard . Here is what i get in the logcat - 02-17 19:01:09.749: I/MultiDex(2079): VM with version 2.1.0 has multidex support 02-17 19:01:09.749: I/MultiDex(2079): install 02-17 19:01:09.749: I/MultiDex(2079): VM has multidex support,