proguard

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' while generating APK

怎甘沉沦 提交于 2019-12-06 14:09:41
问题 I have generated an APK of my Android application (as a try) and I did not have any problem, the APK has been generated correctly. Now, I want to obfuscate my code while generating the APK so I used the following line on my release block on build.gradle file. minifyEnabled true The problem is that now it throws me the following error: Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. java.io.IOException: Please correct the above warnings first. with a

Using proguard with GSON and RoboGuice fails when using a EnumTypeAdapter

六月ゝ 毕业季﹏ 提交于 2019-12-06 13:25:37
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 com.google.gson.Gson.getAdapter(Unknown Source) The EnumTypeAdapter being used: public class

Is it safe to ignore these proguard notes for kotlin?

断了今生、忘了曾经 提交于 2019-12-06 12:33:54
I don't understand why I'm getting these notes from proguard and if I've to do anything to address them. Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class kotlin.internal.jdk8.JDK8PlatformImplementations Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class kotlin.internal.JRE8PlatformImplementations Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class kotlin.internal.JRE7PlatformImplementations Note: kotlin.jvm.internal.Reflection: can't find dynamically referenced class kotlin

proguard does not stop obfuscating method name despite “Keep names”

半世苍凉 提交于 2019-12-06 11:08:18
I have following set up for keeping class and class method names. It works well with classes hence classes in package and sub packages of com.seleniumtests.** are not obfuscated. But despite I have selected Keep names - .class method names check box, methods in classes of package com.seleniumtests.** are still obfuscated. Did I miss any configuration? The checkbox for Keep names - .class method names is unrelated. It preserves the names of classes that are used in .class constructs, for instance MyClass.class . It is rarely required. The screenshot doesn't show the custom rules that you have

Android: What is ProGuard and when do i need to use it?

我的未来我决定 提交于 2019-12-06 09:21:15
问题 I've built a news app that gets its contents from the news website using JSON, the app has GCM service (Push Notifications) so i have declared my SENDER-ID in the MainActivity and there is no user accounts. I think the only sensitive info here is the SENDER-ID . So what exactly is ProGuard ? and do i need to use it in my app ? ( NOTE : I have read the documentations about ProGuard but i didn't quite understand when to use it). 回答1: A tool which reduces size of your apk, optimze your code and

android proguard, skip jars

荒凉一梦 提交于 2019-12-06 09:13:21
问题 I want to know if it is possible to skip jars in proguard so that it don't obfuscate them... I am trying to do that with this comand: -libraryjars myjar.jar but I keep having problems with my code.. I am trying to export a project that has javamail api for android and the project is supposed to retreive my exchange emails using imaps protocol... I am using a trust manager to pass the certificate validation (because I have self signed certificate on my exc server). If I compile and run the app

Proguard obfuscating does not work

拈花ヽ惹草 提交于 2019-12-06 08:53:32
问题 I'm trying to obfuscate my package names including that one of my used libraries. I use this build config in my gradle file: buildTypes { debug { versionNameSuffix "-Development" debuggable true runProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } #... This is my proguard file: # Butterknife -dontwarn butterknife.internal.** -keep class **$$ViewInjector { *; } -keepnames class * { @butterknife.InjectView *;} # OrmLite uses reflection

Having difficulties dealing proguard with spring

故事扮演 提交于 2019-12-06 08:38:25
问题 I have a web application using spring annotations extensivley and I have my proguard configuration like the following: -printmapping out.map -dontoptimize -keepdirectories -renamesourcefileattribute SourceFile -keepattributes Exceptions,SourceFile,LineNumberTable,*Annotation* -adaptresourcefilenames **.xsd,**.wsdl,**.xml,**.properties,**.gif,**.jpg,**.png -adaptresourcefilecontents **.xsd,**.wsdl,**.xml,**.properties,META-INF/MANIFEST.MF -dontshrink -keepclassmembernames class * { java.lang

Android proguard, Nullpointer Exception on device

我们两清 提交于 2019-12-06 08:22:19
问题 I get an exception when I istall my app on the phone. It works without proguard. What is wrong in my configuration? Thank you very much! The config is a default android config i found somwhere. Dont know whats going on D/AndroidRuntime(15388): Shutting down VM W/dalvikvm(15388): threadid=1: thread exiting with uncaught exception (group=0x40c3a1f8) E/AndroidRuntime(15388): FATAL EXCEPTION: main E/AndroidRuntime(15388): java.lang.NullPointerException E/AndroidRuntime(15388): at aV.setViewValue

How to use proguard in cordova android App

痞子三分冷 提交于 2019-12-06 07:50:01
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 Queen You need to uncomment below lines from your project.properties file To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir,