我尝试使用proguard android工具。但是没有安装模糊的apk(我使用eclipse导出向导)。 dex2jar向我显示所有类都在jar中,但以* .dump.txt命名并包含如下内容:
//class:0002 access:0x0011
public final class com.company.android.BuildConfig
//field:0000 access:0x0019
//Lcom/company/android/BuildConfig;.DEBUG Z
public static final Z DEBUG=true;
//method:0000 access:0x10001
//Lcom/company/android/BuildConfig;.<init>()V
public V <init>()
this:v0 //com.company.android.BuildConfig
LOCAL_VARIABLE LL0 ~ LL1 v0 -> this // Lcom/company/android/BuildConfig;
LABEL | LL0: line 4
INVOKE_DIRECT | |v0.<init>() //Ljava/lang/Object;.<init>()V
RETURN_VOID | |return
LABEL | LL1:
我哪里错了?我怎样才能使工作混淆apk?
我的proguard.cfg:
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
我的project.properties:
target=android-8
proguard.config=proguard.cfg
谢谢!