proguard

How to exclude specific jars from injars during obfuscation using proguard?

非 Y 不嫁゛ 提交于 2019-12-11 11:08:36
问题 I have many external jars inside my Application\WEB-INF\lib Consider abc.jar as one of my external jar, which i do not want to obfuscate So can i exclude as like below using filter in my proguard configuration ? -injars C:\Application\WEB-INF\lib(!abc.jar) If i do as above for injar option filter means, abc.jar is also getting obfuscated. Please suggest where i am going wrong ? How to avoid obfuscating it ? 回答1: You should use -injars to specify code that you want to be processed, and

Proguard error preventing APK from building with “returned error with error code 1”

拜拜、爱过 提交于 2019-12-11 10:27:37
问题 The issue is when trying to build a signed APK, it errors at the last step with this: [2013-06-20 11:39:34 - MyApp] Proguard returned with error code 1. See console [2013-06-20 11:39:34 - MyApp] Unable to access jarfile /Users/rob/Android I am using the latest Eclipse ADT v22.0.1-685705 (just installed this morning) and it seems like this issue has been around for at least a month now according to Google. 回答1: In order to fix this, Change: java -jar $PROGUARD_HOME/lib/proguard.jar "$@" To:

Obfuscate the folder structure - Android

夙愿已清 提交于 2019-12-11 10:14:25
问题 I am developing a android application. I obfuscates the code of the project using progaurd. I want to obfuscate the folder structure as well. anyway to do that ? Thanks for your help 回答1: ProGuard contains various directives, for your ProGuard rules file, that can obfuscate package names, such as -flattenpackagehierarchy and -repackageclasses. Just make sure that anything referenced from AndroidManifest.xml or otherwise accessed via reflection is kept intact. It is conceivable that the

Proguard causing NoSuchMethodException - followup

橙三吉。 提交于 2019-12-11 09:13:00
问题 Following the suggestions from @AlexWein in this question and looking at ProGuard Troubleshooting, I have the following in a SherlockFragment: Class<?> c = Class.forName("co.uk.MyApp.pdf.MyData"); Method main = c.getDeclaredMethod("pdfsleep", Report_Holder.class); Report_Holder paramsh = null; paramsh = SRH; main.invoke(null, (Object)paramsh); "co.uk.MyApp.pdf.Data" constructor is: public class MyData { public static void pdfsleep(Report_Holder args) { ... } } Proguard is set up like so:

Facebook and proguard

假如想象 提交于 2019-12-11 08:18:27
问题 I'm trying to integrate Facebook into my app and whenever the app starts, I get the following error: com.facebook.as: com.facebook.c.f got an unexpected method signature: public abstract org.json.JSONObject com.facebook.c.c.c() at com.facebook.c.h.a(Unknown Source) at com.facebook.c.f.b(Unknown Source) at com.facebook.c.f.invoke(Unknown Source) at $Proxy0.c(Native Method) at com.facebook.b.bo.a(Unknown Source) at com.facebook.b.bo.onPostExecute(Unknown Source) at android.os.AsyncTask.finish

Genson with Android - Proguard config

限于喜欢 提交于 2019-12-11 07:39:37
问题 I have a problem with proguard config in Android Project. I'm using Genson to parse incoming JSON data. It is fast and there is no need for extra configuration or deserializers, because on the Server-side there is also Genson. Everything works fine in debug mode, but in release, with proguard it doesn't. Unfortunately I have some error during runtime: FATAL EXCEPTION: main Process: com.es.mobile.meedy, PID: 16650 java.lang.UnsupportedOperationException: Couldn't find parameter at 0 from type

Proguard with Parceler and Realm

断了今生、忘了曾经 提交于 2019-12-11 06:54:27
问题 I'm using Realm and Parceler and everything is working fine but when I enable the Proguard I'm getting an error when doing: Parcels.wrap(obj) I'm getting the following error: org.parceler.ParcelerRuntimeException: Unable to find generated Parcelable class for io.realm.g, verify that your class is configured properly and that the Parcelable class io.realm.g$$Parcelable is generated by Parceler. Although I have configured the proguard rules like: ##---------------Begin: proguard configuration

Firebase Test Lab fails when using ProGuard + Dagger

别来无恙 提交于 2019-12-11 06:50:00
问题 Instrumented tests do pass on local emulators and physical devices but fail on Firebase Test Lab, when the following conditions are met: ProGuard is enabled for the debug builds; There are both Dagger and Espresso dependencies. FTL shows different test issues: 1) In case with APIs 26-28 it shows either Instrumentation run failed due to 'java.lang.NoClassDefFoundError' or Instrumentation run failed due to 'Process crashed.' Exception stacktrace looks like this, it's not always shown in

Card.io on Android doesn't show scan option in release mode

二次信任 提交于 2019-12-11 06:26:20
问题 We're developing an Android app with Card.IO integrated in it. It works fine in the debug mode and shows scan option, however when we make a release build, the scan option disappears and instead the user can only enter the card number manually and it's not what we need. When we make the release build, we specify in the Android manifest file: <application android:debuggable="false" ... And as written in docs we add the following to the proguard file: -keep class io.card.** -keepclassmembers

App crashes using proguard

Deadly 提交于 2019-12-11 06:17:40
问题 My app crashes because of my Proguard error. I have posted this question somewhere too. How can I format the proguard error? Kindly help me out to solve this: My build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "24.0.1" defaultConfig { applicationId 'com.quorate.android' minSdkVersion 16 targetSdkVersion 24 versionCode 3 versionName "1.2" testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' vectorDrawables