kik*_*oso 2 resources android proguard adt
我正在尝试将ProGuard与我的一个应用程序一起使用,让我们说A.这个应用程序包含另一个应用程序作为库(比方说B).这是我的proguard文件.
-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 *;
}
-injars bin/classes
-libraryjars lib
Run Code Online (Sandbox Code Playgroud)
当我第一次执行它时,我收到以下错误:
Proguard returned with error code 1. See console
[2012-01-05 12:18:55 - BSabadellHC-Entrega] Note: there were 1059 duplicate class definitions.
[2012-01-05 12:18:55 - BSabadellHC-Entrega] java.io.IOException: Can't write [/private/var/folders/19/321lw_654pzdqr8y34ysvsx80000gn/T/android_7971378611269030364.jar] (Can't read [/private/var/folders/19/321lw_654pzdqr8y34ysvsx80000gn/T/android_1457478862713006376.jar] (Duplicate zip entry [com/ideaknowing/labs/android/ikarengine/e.class == android_1457478862713006376.jar:com/ideaknowing/labs/android/ikarengine/R$anim.class]))
Run Code Online (Sandbox Code Playgroud)
我的相关部分是:
所以我的想法显然是从ProGuard中排除R文件,为此我包括以下几行代码:
-keep public class net.firsrproject.android.R
-keep public class com.ideaknowing.labs.android.ikarengine.R
Run Code Online (Sandbox Code Playgroud)
不过,我仍然得到同样的错误(所以我猜这些文件仍然包含在Proguard中).有没有人从ProGuard中删除R文件?关于如何摆脱这个错误,是否有任何提示或建议?
感谢致敬