proguard

Cannot fix Android Proguard Returned with error code 1 error

筅森魡賤 提交于 2019-12-04 04:25:29
When I try to use proguard in my android application simply adding proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt to my project.properties file, the APK export fails with the message Proguard Returned with error code 1 This is my project.properties file target=android-18 android.library.reference.1=../LVL proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt This is the error stack: Proguard returned with error code 1. See console [2013-08-28 18:27:13 - MyApp] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt

Problem with Proguard and XmlPullParser

ε祈祈猫儿з 提交于 2019-12-04 04:04:38
问题 I'm having a bit of trouble on an Android project using Proguard with some libraries. Specifically, i'm having an XmlPullParser collision, and no matter what i seem to do, i can't seem to solve it. Here are the libraries I am using: JacksonParser, includes: Jackson-all.1.6.4.jar Joda-time.1.6.2.jar jsr311-api-1.0.jar stax2-api-3.0.0.jar XStream, which includes : xpp3_min-1.1.4c.jar xstream-for-android-1.0.0.jar There are also others, but they're a non-issue. These seem to be the culprit of

Proguard obfuscation results in java.lang.IllegalArgumentException: class declares multiple JSON fields named “a”

筅森魡賤 提交于 2019-12-04 03:52:14
Upon starting up my app logs two errors, but only after obfuscation. Without obfuscation there are no errors. Unless I'm being misled, the errors are like: class Property declares multiple JSON fields named a and same for class PropertyDefinition. 05/18 03:33:19.465 java.lang.IllegalArgumentException: class PropertyDefinition declares multiple JSON fields named a: com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:122) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72) com.google.gson

How to obfuscate only few class or a single package?

烈酒焚心 提交于 2019-12-04 03:46:48
I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ? Please read the answer before downvote. You need ! before your class. Take a look at Proguard Manual : Keep option part and Android example . Example : -keeppackagenames com.vtcmobile { ! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser } Edit: Use -keeppackagenames [package_filter] Specifies not to obfuscate the given package names. The optional filter is a comma

proguaid混淆maven工程问题总结

懵懂的女人 提交于 2019-12-04 03:39:12
proguaid混淆maven工程问题总结 1. 下载完代码之后,执行maven updateproject,否则打包有可能会有问题 2. 在日志中查看引入jar包的父jar,排除工程中与java环境的tools.jar包冲突,防止混淆报错:java.io.IOException: The same input jar [C:\Program Files\Java\jdk1.8.0_161\lib\tools.jar] is specified twice. 3. 加入proguard混淆配置之后,proguard混淆的时候会去找所有的第三方jar包路劲,并加入到classpath中,依赖的jar过多,导致加入classpath的jar路劲过长,超过了8191的长度,报错:Cannot run program "C:\Program Files\Java\jdk1.8.0_161\jre\bin\java.exe": CreateProcess error=206, 文件名或扩展名太长。 解决方案 : a. 使用较短的文件夹和文件的名称。 b. 减少文件夹树的深度。 c. 将文件存储在较少的文件夹,以便在 PATH 环境变量中需要较少的文件夹。 d. 调查可能的方法可以用来减少定位的.dll 文件的路径的依赖项。 建议把maven仓库地址的路劲变短,由之前的C:\Users

Gradle badass-runtime-plugin and ProGuard Gradle Plugin

℡╲_俬逩灬. 提交于 2019-12-04 03:37:20
How to run proguard before jPackage? Introduction Im developing an app in JavaFx using gradle plugins and packaging it with jPackager, also using the gradle plugins. The main plugins im using are: id 'org.openjfx.javafxplugin' version '0.0.8' id 'org.beryx.runtime' version '1.7.0' id "com.github.johnrengelman.shadow" version "5.1.0" My current gradle version is: gradle-5.6.2-all Problem description How do I use proguard so the code gets obfuscated and optimized before jPackage do its job? I can run the proguard tasks, but when I run jPackage, the code doesnt get obfuscated! Ive found a

Android + Proguard + Apache POI

℡╲_俬逩灬. 提交于 2019-12-04 03:32:07
问题 Someone was able to get the Apache POI library to work after obfuscation. I read a lot of information, tried different methods, but still get the error: a.a.b.a: Provider com.bea.xml.stream.EventFactory not found org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(Unknown Source) at org.apache.poi.openxml4j.opc.OPCPackage.init(Unknown Source) at org.apache.poi.openxml4j.opc.OPCPackage.<init>(Unknown Source) at org.apache.poi.openxml4j.opc.Package.<init>

android - proguard error in android studio

丶灬走出姿态 提交于 2019-12-04 03:27:47
I want to use proguard for my application ,I enabled it but when I want to generate apk file ,it gives me this error: Information:Gradle tasks [:app:assembleRelease] :app:preBuild UP-TO-DATE :app:preReleaseBuild UP-TO-DATE :app:checkReleaseManifest :app:preDebugBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72300Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72300Library UP-TO-DATE :app:prepareComAndroidSupportDesign2300Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72300Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42300Library UP-TO-DATE :app

Conflict between Android data binding and Guava causes ProGuard error

瘦欲@ 提交于 2019-12-04 03:25:51
I get the following error while compiling my Android app with ProGuard enabled. Warning: library class android.databinding.tool.util.SourceCodeEscapers$1 extends or implements program class com.google.common.escape.CharEscaper Warning: library class android.databinding.tool.util.SourceCodeEscapers$JavaCharEscaper extends or implements program class com.google.common.escape.ArrayBasedCharEscaper Warning: library class android.databinding.tool.util.SourceCodeEscapers$JavaCharEscaperWithOctal extends or implements program class com.google.common.escape.ArrayBasedCharEscaper Warning: there were 3

FileNotFoundException on proguard-rules.pro file

北慕城南 提交于 2019-12-04 03:03:48
问题 I'm using Android Studio v.1.0 My build file : buildTypes { debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } but when I try to make a release build, I get an error : Error:Execution failed for task ':app:proguardRelease'. java.io.FileNotFoundException: F:....\app\proguard-rules.pro (File not found) I think, that