proguard

How to make Proguard ignore external libraries?

断了今生、忘了曾经 提交于 2019-12-17 06:38:40
问题 I want to use Proguard mainly for obfuscation reasons. My problem is that I have three libraries, Twitter4J and two signpost libraries. These libraries caused errors when I tried to create an signed APK. To get over this I put the following in the proguard.config file... -dontwarn org.apache.commons.codec.binary.** -dontwarn org.slf4j.** -dontwarn com.sun.syndication.io.** -dontwarn com.sun.syndication.feed.synd.* While this got rid of the errors in the console, when i loaded my signed APK

Proguard and reflection in Android

十年热恋 提交于 2019-12-17 06:35:16
问题 I have just used proguard, but classes I am trying to instantiate via reflection are not working. I have an interface Algorithm I pass classes like this AlgorithmFactory.SomeClassThatExtendsAlgorithmImpl.class The class is instantiated like this public ArrayList<Algorithm> getAlgorithms(Context cnx) { ArrayList<Algorithm> list = new ArrayList<Algorithm>(); for(Class<? extends Algorithm> alg: algorithms) { try { Constructor<? extends Algorithm> c = alg.getConstructor(Context.class); list.add(c

Android Proguard Javascript Interface Fail

人走茶凉 提交于 2019-12-17 06:11:28
问题 I use in my project a piece of code as described here http://lexandera.com/2009/01/extracting-html-from-a-webview/ I create the .apk file, install it on my device and it correctly works. If I try to use the obfuscation with proguard the project fails, the method showHTML(String html) of MyJavaScriptInterface is not reached. My proguard configuration regarding that -keep public class com.mypackage.MyClass.MyJavaScriptInterface -keep public class * implements com.mypackage.MyClass

proguard hell - can't find referenced class

别说谁变了你拦得住时间么 提交于 2019-12-17 03:34:09
问题 So, I'm TRYING to release some software but Proguard is giving me a headache. When I try to export using proguard I'm getting lots of warning ie "can't find referenced class" For example: [2011-08-07 17:44:37 - GAME] Warning: org.simpleframework.xml.stream.StreamReader: can't find referenced class javax.xml.stream.events.XMLEvent [2011-08-07 17:44:37 - GAME] Warning: there were 52 unresolved references to classes or interfaces. [2011-08-07 17:44:37 - GAME] You may need to specify additional

Removing Log call using proguard

陌路散爱 提交于 2019-12-17 02:44:37
问题 I am trying to use proguard to strip all my logs: I have entered the following line in my proguard-project.txt: -assumenosideeffects class android.util.Log { *; } And my project.properties looks like this: proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt Inspite of this the logs continue to show in my application. What exactly am I doing wrong here? 回答1: You shouldn't specify the '*' wildcard, because that includes methods like 'Object#wait()'. Better

Android 混淆 ProGuard

萝らか妹 提交于 2019-12-14 21:11:29
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 配置文件build.gradle android { signingConfigs { release { keyAlias 'XXX' keyPassword 'XXX' storeFile file('../key/XXX.jks') // 位置:xxApplication/key/XXX.jks' storePassword 'XXX' } } compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.XXX.XXX" minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { //日志 buildConfigField "boolean", "LOG_DEBUG", "true" //混淆 minifyEnabled true //Zipalign优化 zipAlignEnabled true //移除无用的resource文件 shrinkResources true //签名 signingConfig signingConfigs.release //的混淆文件

Proguard claims to obfuscate the .apk, but does not

馋奶兔 提交于 2019-12-14 03:33:11
问题 I'm exporting an Android application from Eclipse. Proguard thinks it is obfuscating the .apk according to the console, dump.txt, mapping.txt, seeds.txt and usage.txt output, but when I decompile the .apk itself it is not obfuscated. Names of classes and fields are intact. I have tried various different Proguard configs but there doesn't seem to be anything wrong in terms of the configs. I make sure to clean the project so the classes.dex file won't be outdated. 回答1: This worked for me in

Proguard Error Code 1: Proguard.ParseException

淺唱寂寞╮ 提交于 2019-12-14 02:28:35
问题 I am trying to export my android application with proguard enabled when I get this error:- Proguard returned with error code 1. See console proguard.ParseException: Expecting java type before ' ' in line 79 of file 'C:\Documents and Settings\Acer.ACER-2487AA0235\My Documents\Eclipse\Myproject\proguard-project.txt', included from argument number 4 at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1187) at proguard.ConfigurationParser

Android application signing: Proguard returned with error code 1. see console

落爺英雄遲暮 提交于 2019-12-14 01:32:50
问题 I have built an application that uses JacksonJson as a library. I am trying to export it as a signed application and getting the proguard error. I have tried various solutions posted on the internet, but none seems to work. Any help will be appreciated. Console : Proguard returned with error code 1. See console Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper Warning: com.fasterxml.jackson.jaxrs.base

How can I force Proguard make my illegible .XML resource file?

痴心易碎 提交于 2019-12-13 22:02:46
问题 I used ProGuard in android studio to protect my data resources because I have two files in it: res / raw / fiche.xml and res / raw / fiche1 .XML so I'd make the content of my unreadable files. My question is how to make these two files unreadable with Proguard. thank you in advance. 回答1: ProGuard only affects Java code, not resources. You will need to research other tools, like DexGuard, that may offer resource obfuscation. Whether there is a tool that can obfuscate raw resources is another