proguard

Android ant problem (for using ProGuard)

99封情书 提交于 2020-02-08 05:30:31
问题 Does anybody know where I can look for an configuration error? I'm getting this error message as soon as I'm trying to compile and to include ProGuard in my project (using the recently released Android SDK). Looking at the mentioned file of the error message it's a file by Google and I don't see any errors there. Any idea? Thx. ant release ... BUILD FAILED C:\ [...] \Android SDK\tools\ant\main_rules.xml:430: Expecting class path separator ';' before 'SDK\platforms\android-8\android.jar' in

Android Volley always fails with Proguard

天涯浪子 提交于 2020-02-08 03:11:28
问题 The goal is to deploy an application with obfuscation and minification applied. Usual builds without minification work fine. But when minifyEnabled is switched to true, everything compiles too, but all Volley requests fail with error callback ( onErrorResponse ) regardless on successful result. Minification config in build.gradle : buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug

Idea插件开发中使用ProGuard混淆代码

爱⌒轻易说出口 提交于 2020-02-01 19:07:28
配置gradle插件 gradle配置ProGuard插件 buildscript { repositories { jcenter() } dependencies { classpath 'net.sf.proguard:proguard-gradle:6.2.2' } } 添加混淆task // idea 依赖所在目录 def ideaPath = "xxx" task proguard(type: proguard.gradle.ProGuardTask, dependsOn: jar) { // 输出混淆前->混淆后的映射 printmapping "$buildDir/mapping.txt" // 混淆规则文件 configuration 'proguard-rules.pro' // 项目依赖jar libraryjars configurations.runtimeClasspath.collect() // jdk 依赖,区分jdk8 前后版本 if (System.getProperty('java.version').startsWith('1.')) { libraryjars "${System.getProperty('java.home')}/lib/rt.jar" } else { libraryjars "${System.getProperty

Proguard and Gson - Convert variable name inside arraylist

自古美人都是妖i 提交于 2020-01-30 10:59:48
问题 In debug, my code works fine. When I release my apk with proguard 5, Proguard offuscate my variables, and when I try to "Jsonify", the resulting string is offuscated, and so, my PHP script doesn't understand anything. Here's my code: ArrayList lCapturas=...; if (lCapturas != null) { Gson gson = new Gson(); Type listOfCapturaObject = new TypeToken<List<Captura>>() { }.getType(); json = gson.toJson(lCapturas, listOfCapturaObject); } and my Json string [{"j":"2014-09-10 17:35:25","e":"2014-09-

Android Error:Execution failed for task ':app:compileDebugJavaWithJavac'

a 夏天 提交于 2020-01-29 03:52:57
最近Android项目开发中碰到一个异常,折腾了许久才找到问题的根源。 Google、百度搜索前两页内容浏览了一遍,总结了几种方案: 1、升级更新buildToolsVersion 到最新版本 2、升级Android Studio 2.2.2版本,JDK 1.8版本 3、配置JAVA_HOME路径 android { compileSdkVersion 24 buildToolsVersion "24.0.2" defaultConfig { applicationId "com.mycompany.appname" minSdkVersion 17 targetSdkVersion 24 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" jackOptions { enabled true } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions {

Proguard issue: java.lang.RuntimeException ProGuardTransform

会有一股神秘感。 提交于 2020-01-25 21:28:47
问题 Been trying to figure out this issue. I'm a bit of an Android noob, I can handle code but when it comes to configuration issues I'm a bit lost. I've inherited this project and haven't found a solution yet. I'm getting a vague proguard issue when building the APK. If I remove proguard and minifyEnabled from the Gradle config for the release build variant, the APK builds fine, although it's larger than it should be by 10 mb. release { debuggable false //minifyEnabled true //proguardFiles

Proguard issue: java.lang.RuntimeException ProGuardTransform

。_饼干妹妹 提交于 2020-01-25 21:28:33
问题 Been trying to figure out this issue. I'm a bit of an Android noob, I can handle code but when it comes to configuration issues I'm a bit lost. I've inherited this project and haven't found a solution yet. I'm getting a vague proguard issue when building the APK. If I remove proguard and minifyEnabled from the Gradle config for the release build variant, the APK builds fine, although it's larger than it should be by 10 mb. release { debuggable false //minifyEnabled true //proguardFiles

ProGuard代码混淆

点点圈 提交于 2020-01-25 14:27:43
简介 ProGuard 是一个开源的Java代码混淆器,下载 ProGuardGui工具 。 Maven Spring Boot ProGuard demo演示 <build> <finalName>${artifactId}</finalName> <plugins> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugin</artifactId> <version>2.0.11</version> <executions> <execution> <!-- 混淆时刻,这里是打包的时候混淆--> <phase>package</phase> <goals> <!-- 指定使用插件的混淆功能 --> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <proguardVersion>6.2.2</proguardVersion> <injar>${project.build.finalName}.jar</injar> <outjar>${project.build.finalName}.jar</outjar> <!-- 开启混淆 --> <obfuscate>true<

Android App crashes after proguard obfuscation (Google plus people search)

徘徊边缘 提交于 2020-01-25 11:50:36
问题 I added some code to my app to search people on Google Plus. This code works well without Proguard. After running proguard to obfuscate the code, my app crashes when searching for people on google plus. 09-14 10:21:51.346: E/AndroidRuntime(12527): FATAL EXCEPTION: AsyncTask #4 09-14 10:21:51.346: E/AndroidRuntime(12527): Process: com.mapegames.sudokukings, PID: 12527 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300

Exclude files using proguard rules

丶灬走出姿态 提交于 2020-01-25 06:13:06
问题 I am trying to reduce the size of the apk using proguard . I am getting these warnigs messages while doing so , Warning: can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [commons-lang-2.6.jar:META-INF/LICENSE.txt]) Warning: can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [commons-lang-2.6.jar:META-INF/NOTICE.txt]) Warning: can't write resource [.readme] (Duplicate zip entry [classes.jar:.readme]) Apart from keeping classes is there any way to exclude these