我在一臺新計算機上安裝了android SDK後導入了一個較老的項目。在eclipse中的「問題」窗口中出現以下錯誤。Android - proguard.cfg錯誤
Obsolete proguard file; use -keepclasseswithmembers instead of -keepclasseswithmembernames proguard.cfg /MyApplication line 1
這是文件。我試圖用-keepclasseswithmembers
替換這個文件中的-keepclasseswithmembernames
,但它沒有幫助。
-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>;
}
-keepclasseswithmembernames * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
你正在使用什麼proguard版本? 'java -jar android-sdk/tools/proguard/lib/proguard.jar'? – 2011-12-28 00:35:36
我正在使用版本4.4 – james 2011-12-28 00:58:56