proguard

Android - proguard.cfg error

一笑奈何 提交于 2019-12-23 03:34:27
问题 I imported an older project after a I installed the android SDK on a new computer. I am getting the following error in the "problems" window in eclipse. Obsolete proguard file; use -keepclasseswithmembers instead of -keepclasseswithmembernames proguard.cfg /MyApplication line 1 Here is the file. I tried replacing the -keepclasseswithmembernames in this file with -keepclasseswithmembers but it did not help. -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses

android proguard makes the youtube api oauth disabled?

流过昼夜 提交于 2019-12-23 03:25:48
问题 I use the youtube java api client here http://code.google.com/p/google-api-java-client/ when I finish coding, the app goes well when unsigned. When I signed it, the Android signed it with proguard, which makes the signed apk. I installed it, the app goes wrong. When I try to login, it cann't call the right method(I guess), unlike when it's unsigned, it goes perfected well. here is the proguard-google-api-client.txt # ProGuard Configuration file # # See http://proguard.sourceforge.net/index

Upgraded to Android Studio 1.0 & Gradle 1.0.0, aapt makes PNG images larger if pre-optimized

别来无恙 提交于 2019-12-23 01:21:35
问题 I performed an upgrade to Android Studio 1.0 & Gradle 1.0.0 today, from Android Studio 0.86 & Gradle 0.13. Prior to the upgrade, I was using "runProguard = true" option in my release builds extensively, to reduce my APK size to just under 50 MB, to meet Google Play Store's APK size restrictions. However, with the new Android Studio 1.0 / Gradle 1.0.0 with "minifyEnabled = true", I am seeing resulting APKs at 55.6 MB, which is significantly larger than before. The debug build APKs are

How to use proguard in cordova android App

孤街醉人 提交于 2019-12-22 17:41:15
问题 I have a finished cordova project and i want to use proguard inorder to prevent others from reverse engineering the APK.But i have trouble doing this. In http://developer.android.com/tools/help/proguard.html It says that "When you create an Android project, a proguard.cfg file is automatically generated in the root directory of the project. " But i cannot find a such file. So how do i apply proguard to my app? Thank you 回答1: You need to uncomment below lines from your project.properties file

Using proguard with GSON and RoboGuice fails when using a EnumTypeAdapter

情到浓时终转凉″ 提交于 2019-12-22 17:19:08
问题 When trying to use a EnumTypeAdapter with Proguard, it results in a AssertionError in Gson.getAdapter(). This error seems to be due to type information being lost... below is all the relevant source code: The Exception: 03-18 13:27:12.905: ERROR/roboguice(12139): Throwable caught during background processing java.lang.AssertionError at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.<init>(Unknown Source) at com.google.gson.internal.bind.TypeAdapters$24.create(Unknown Source) at

Proguard problems with apk creation

假装没事ソ 提交于 2019-12-22 14:17:53
问题 OK This is driving me nuts since a day. I am mainly an iOS guy so i dont know much about Proguard and stuff. I have made an Android app which includes both dropbox and Google Drive API. The app is working great if i deploy it on a phone thru Eclipse but I am getting a nasty error on Console when i try to export the app for apk file generation. My project.properties files was like so... # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user

Crashlytics crash with proguard

旧时模样 提交于 2019-12-22 13:52:42
问题 I did everything that fabric ask in their documentation: -renamesourcefileattribute SourceFile -keepattributes *Annotation* -keepattributes SourceFile,LineNumberTable -keep public class * extends java.lang.Exception -keep class com.crashlytics.** { *; } -dontwarn com.crashlytics.** But still got this error: E/Answers: Failed to submit events task java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@d2d2a84 rejected from

Using Spongycastle with Proguard

安稳与你 提交于 2019-12-22 10:39:00
问题 I've been strugling with proguard to make Spongycastle work. Most of the time, the problem comes when I'm exporting a signed APK, either I've got error, or the app will just crash before starting. So, I've managed to gather informations to get a working proguard configuration : -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -dontpreverify -verbose -repackageclasses '' -allowaccessmodification -keepattributes *Annotation

Android Proguard Release causes not executing for-loop

旧时模样 提交于 2019-12-22 08:45:17
问题 In my Android app I am building in release mode. With Proguard activated an rare issue is caused, a specific for-loop never is executed: List<MyClass> objectList = getObjectList(); Log.d("Step 1", String.valueOf(objectList.size())); //Print size > 0 for(MyClass object: objectList) { Log.d("Step 2", object.toString()); //Never printed ... } The "Step 1" Log is printed correctly and objectList.size() > 0 . I don't understand what is causing "Step 2" Log is never printed (and all code into for

In proguard, what is the keyword to preserve package/default access variables and methods?

≡放荡痞女 提交于 2019-12-22 08:08:20
问题 You can say: -keepclassmembers class sun.** { public protected *; } But I am not excluding package/default access methods :( void myMethod { } 回答1: You can add another -keepclassmembers like that: -keepclassmembers class com.mycompany.MyClass { !public !protected !private *; } 来源: https://stackoverflow.com/questions/26183906/in-proguard-what-is-the-keyword-to-preserve-package-default-access-variables-an