proguard

Error while Setting of Proguard and Exporting APK

扶醉桌前 提交于 2019-12-17 19:46:25
问题 I am doing first time proguard setting on My Android Project and Exporting My APK File but I got Following errors: (I also not found any proguard.cfg file in my project root) [2013-08-01 10:54:42 - SalesmanTracker] Note: there were 2 duplicate class definitions. [2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.collect.MinMaxPriorityQueue: can't find referenced field 'int UNSET_EXPECTED_SIZE' in class com.google.common.collect.MinMaxPriorityQueue$Builder [2013-08-01 10:54:42

ProGuard and Gson on Android (ClassCastException)

。_饼干妹妹 提交于 2019-12-17 17:48:05
问题 I am having a hell of a time with Gson and ProGuard. I have a simple object and when I parse tojson, save to sqllite and read back from the database in order to load the json back to my object, I get a java.lang.classcastexception. If I dont use ProGuard, everthing works fine. I have verified that the json string being sent to and gotten from the database is the same. The exception is not thrown when it converts from json, but rather when I try to access the object. Here is my simple object:

Android - How to check Proguard obfuscation has worked?

怎甘沉沦 提交于 2019-12-17 17:37:15
问题 I have obfuscated my apk, but the file size has only been reduced from 12MB to 10.5MB. The reason it is only a relatively small reduction may be because my app uses a couple of large libraries, but is there any way I can check the level of obfuscation that has been performed? Just in case, this is my proguard-project.txt file... # To enable ProGuard in your project, edit project.properties # to define the proguard.config property as described in that file. # # Add project specific ProGuard

Duplicate Zip Entry after Gradle Plugin v0.13.1

左心房为你撑大大i 提交于 2019-12-17 16:17:09
问题 I've been using the Gradle Android plugin v0.12 but I decided to upgrade to the new version, because I needed the new functionality (and the improved speed is always a plus). After updating to the new v0.13.1, I keep getting the "Duplicate Zip Entry" (from Proguard) while everything worked before. The full error: java.io.IOException: Can't write [/Users/.../classes-proguard/netherlands/release/classes.jar] (Can't read [/Users/.../.gradle/caches/modules-2/files-2.1/org.apache.commons/commons

Proguard.cfg Missing

丶灬走出姿态 提交于 2019-12-17 15:44:35
问题 I made the mistake of upgrading eclipse today and now can't get my a new Android project to get going. I get the message Proguard.cfg (the file can't be found). Where is this thing I can't seem to find it? Is it possible to get rid of it I don't need Obfuscation in this project... Thanks 回答1: If you really don't need Proguard to obfuscate your release builds, you can remove the following line from the default.properties file in your project root folder: proguard.config=proguard.cfg If you

Android ProGuard settings for Facebook

自闭症网瘾萝莉.ら 提交于 2019-12-17 10:59:10
问题 I finally found out why my app crashes built for release. ProGuard was indeed stripping code from my application but i prevented this by manually adding the classes with the keep command in the proguard-android.txt (found in the sdk). For Facebook I used: -keep class com.facebook.android.* -keep class android.webkit.WebViewClient -keep class * extends android.webkit.WebViewClient -keepclassmembers class * extends android.webkit.WebViewClient { <methods>; } But I think I'm still missing

can't generate signed APK from Android studio “Execution failed for task ':packageRelease'”

淺唱寂寞╮ 提交于 2019-12-17 10:52:43
问题 I am using Android Studio 1.2.2 and tried to generate APK with proguard setting. But I can't do it and got below error message. "Execution failed for task ':packageRelease'. Unable to compute hash of /Users/Documents/projectX/app/build/intermediates/classes-proguard/release/classes.jar " The proguard setting is just simple. -dontshrink -dontoptimize -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose And the gradle file is below. apply plugin: 'com.android

Is it possible to use proguard in debug mode?

无人久伴 提交于 2019-12-17 10:46:56
问题 In my android app, i want to test some features with proguard on. I don't need to really "debug" it, but i want proguard to run when i hit run in eclipse. I don't want to export the binary every time (so, in release mode) and save as apk and get it to the device to test. Is there any way to run proguard in this way? Update: It seems like this is possible if you are not using Eclipse ; as question title does not include Eclipse, there are multiple correct answers to this question. 回答1: Old

Android proguard, keep inner class

南笙酒味 提交于 2019-12-17 09:39:43
问题 My android program has a class A , which has two static inner class . They are found to be stripped from .dex after applying proguard. public class A{ ... static class B{ ... } static class C{ ... } } I have put the following lines in proguard.flags, but seem no luck. -keep class com.xxx.A -keep class com.xxx.A$* Any hint? 回答1: Try adding InnerClasses to the keep attributes. e.g: -keepattributes Exceptions, InnerClasses, ... Also, try adding a body to the "keep" call with an asterisk, like so

How do you stop Proguard from removing type parameters?

蓝咒 提交于 2019-12-17 09:37:43
问题 I am currently attempting to obfuscate a series of libraries. My base library, which contains several classes and methods that use type parameters, is unusable by other code due to the type parameters being removed by Proguard obfuscation. Eliminating the obfuscation removes these issues. I have read through all of the ProGuard usage documents, examples, and troubleshooting, but have been unable to find any documentation on how to deal with type parameters or which aspect of ProGuard strips