proguard

android studio - proguard.cfg file is missing

旧时模样 提交于 2019-12-11 02:17:50
问题 I want to minimize the size of .apk file, so I follow the Android Developer guide (http://developer.android.com/tools/help/proguard.html), but there are some problems I encountered as follows: I create a new project via Android Studio, but it doesn't generate a proguard.cfg file. And there exists a local. Properties file rather than project. Properties file. How can I figure out this issue? 回答1: In the new version of the ADT, the file generated is not proguard.cfg but proguard-project.txt .

proguard doesn't remove logs

谁说胖子不能爱 提交于 2019-12-11 01:47:21
问题 In proguard-rules.pro , I have following configuration: -assumenosideeffects class android.util.Log { public static boolean isLoggable(java.lang.String, int); public static int v(...); public static int d(...); public static int i(...); } In my gradle build , I enable proguard only for release build: buildTypes { debug { debuggable true minifyEnabled false signingConfig signingConfigs.debug } release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard

Proguard does not obfuscate gui components

孤者浪人 提交于 2019-12-11 01:20:38
问题 I would like to use ProGuard to obfuscate my Android app. This works fine. But my gui classes, which extends acitvity, view and sherlockactivity are not obfuscated. Here is the proguard.cfg -injars bin/classes -injars libs -outjars bin/classes-processed.jar -libraryjars C:/Users/android-sdks/platforms/android-17/android.jar -dontpreverify -dontoptimize -repackageclasses '' -allowaccessmodification -optimizationpasses 5 -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

Proguard and apache legacy

北慕城南 提交于 2019-12-10 22:49:01
问题 I'm using Android API 23 and org.apache.http.legacy so I can use Volley . Everything works except when I use proguard . I'm getting this error: Error:Execution failed for task ':app:packageDevRelease'. Unable to compute hash of ...app/build/intermediates/classes-proguard/dev/release/classes.jar My gradle file: apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'com.jakewharton.hugo' repositories { maven { url 'https://maven.fabric.io/public' } } buildscript {

What does the exclamation mark before class path do in ProGuard?

守給你的承諾、 提交于 2019-12-10 22:15:04
问题 I studying the Proguard now but im confused with the exclamation mark ! before the classpath in the settings, such as: -keep class !android.support.v7.view.menu. {*;}** what does this "!" do? does it mean that proguard will not keep this class? but if thats so why do we need it since proguard will obfuscate all the classes? 回答1: It means the same thing that ! means in many other programming languages. It negates the selection that follows. So in your example, the keep directive will apply to

How to keep javadoc visible after obfuscating the code using ProGuard?

拈花ヽ惹草 提交于 2019-12-10 21:52:27
问题 I obfuscating my code using progured 4.7, and im keeping class A that have javadoc describing what the class do. -keep public class com.mysite.ClassA {public *;} -keepattributes InnerClasses -keepparameternames In eclipse when i try to view the docs for this class, eclipse tells me that there's no attached java doc. is there a way to solve this? 来源: https://stackoverflow.com/questions/9269205/how-to-keep-javadoc-visible-after-obfuscating-the-code-using-proguard

Proguard - Can't find any super classes

纵饮孤独 提交于 2019-12-10 18:43:40
问题 I'm getting this error: Unexpected error while performing partial evaluation: Class = [org/apache/log4j/chainsaw/Main] Method = [<init>()V] Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [org/apache/log4j/chainsaw/LoadXMLAction] (not even immediate super class [javax/swing/AbstractAction])) Error: Can't find any super classes of [org/apache/log4j/chainsaw/LoadXMLAction] (not even immediate super class [javax/swing/AbstractAction]) Part of my proguard

Execution failed for task ':app:transformClassesWithMultidexlistForRelease'

廉价感情. 提交于 2019-12-10 18:33:28
问题 I am getting this error in gradle console when I remove the line --dontobfsucate from my proguard rule file. Otherwise I am able to successfully generate the apk. I was previously facing this problem before My Previous Problem. But i was able to resolve that by options --stacktrace --debug . I think I have removed redundant grade redundancies. 13:10:41.397 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 13:10:41.397 [ERROR] [org.gradle

Why am I getting a ClassNotFoundException from Play Services lib when using Proguard?

十年热恋 提交于 2019-12-10 18:29:11
问题 I just turned on ProGuard on my build and now I'm getting a java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.chimera.GmsModuleInitializer" on path: DexPathList[[zip file "/system/app/PlayGames.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] The docs say that everything that I need to use Proguard with Play Services should be included by the Android Gradle plugin: Note: ProGuard directives are included in the Play services client libraries to preserve the

How to obfuscate a class which is referenced in Manifest file using Dexguard?

三世轮回 提交于 2019-12-10 18:11:29
问题 I am using Dexguard in my app and I want to obfuscate a class which extends Activity class, I get to know that it is hard because it is referenced in Manifest file. My question is: is there any way to obfuscate a class which it is referenced in Manifest file? 回答1: Wherever possible, DexGuard obfuscates the names of classes, fields, methods, resources, resource files, asset files, and native libraries, and it adapts their occurrences in the code, the manifest, and other resources. More