请帮帮我。
我用libgdx 0.9.7开发了一款游戏。它也使用谷歌播放服务。
我试图适应游戏,但它一直在告诉我:
Proguard返回错误代码1.请参阅控制台,有1590个重复的类定义。您应该检查是否需要指定其他程序罐。
[2015-10-11 09:35:56 - pool-android] Proguard returned with error code 1. See console
[2015-10-11 09:35:56 - pool-android] Note: there were 1590 duplicate class definitions.
[2015-10-11 09:35:56 - pool-android] You should check if you need to specify additional program jars.
[2015-10-11 09:35:56 - pool-android] Unexpected error while performing partial evaluation:
[2015-10-11 09:35:56 - pool-android] Class = [com/google/android/gms/common/GooglePlayServicesUtil]
[2015-10-11 09:35:56 - pool-android] Method = [showErrorDialogFragment(ILandroid/app/Activity;Landroid/support/v4/app/Fragment;ILandroid/content/DialogInterface$OnCancelListener;)Z]
[2015-10-11 09:35:56 - pool-android] Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [com/google/android/gms/common/SupportErrorDialogFragment] (not even immediate super class [android/support/v4/app/DialogFragment]))
[2015-10-11 09:35:56 - pool-android] java.lang.IllegalArgumentException: Can't find any super classes of [com/google/android/gms/common/SupportErrorDialogFragment] (not even immediate super class [android/support/v4/app/DialogFragment])
[2015-10-11 09:35:56 - pool-android] at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:299)
[2015-10-11 09:35:56 - pool-android] at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:481)
[2015-10-11 09:35:56 - pool-android] at proguard.evaluation.Variables.generalize(Variables.java:136)
[2015-10-11 09:35:56 - pool-android] at proguard.evaluation.TracedVariables.generalize(TracedVariables.java:118)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:682)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:602)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:560)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:264)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:181)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.info.ParameterUsageMarker.visitCodeAttribute(ParameterUsageMarker.java:176)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.info.ParameterUsageMarker.visitProgramMethod(ParameterUsageMarker.java:136)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.OptimizationInfoMemberFilter.visitProgramMethod(OptimizationInfoMemberFilter.java:81)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2015-10-11 09:35:56 - pool-android] at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116)
[2015-10-11 09:35:56 - pool-android] at proguard.optimize.Optimizer.execute(Optimizer.java:341)
[2015-10-11 09:35:56 - pool-android] at proguard.ProGuard.optimize(ProGuard.java:306)
[2015-10-11 09:35:56 - pool-android] at proguard.ProGuard.execute(ProGuard.java:115)
[2015-10-11 09:35:56 - pool-android] at proguard.ProGuard.main(ProGuard.java:492)
在研究了proguard后,我写了这个配置:
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-libraryjars 'C:\Program Files (x86)\Java\jre6\lib\rt.jar'
-libraryjars 'D:\android\pool-android\libs'
-dontwarn java.awt.**
-dontwarn com.badlogic.gdx.jnigen.**
-dontwarn android.support.**
-dontwarn com.google.**
-dontwarn com.badlogic.gdx.**
-dontwarn android.test.**
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication
-dontwarn com.badlogic.gdx.utils.GdxBuild
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
}
-keepclassmembers class com.badlogic.gdx.physics.box2d.World {
boolean contactFilter(long, long);
void beginContact(long);
void endContact(long);
void preSolve(long, long);
void postSolve(long, long);
boolean reportFixture(long);
float reportRayFixture(long, float, float, float, float, float);
}
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-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
-keep class com.badlogic.**
-keep class * implements com.badlogic.gdx.utils.Json*
-keep class com.google.**
-keep class com.openfeint** { <methods>; }
-keepnames class * implements java.io.Serializable
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-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 *;
}
-keep class com.android.vending.billing.**
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
谢谢大家!