我无法在更新Proguard
库后启用Google Play Services
来构建我的包。我的项目minSdkVersion
9 。我正在使用以下版本的服务lib:
android:versionCode="4323030"
android:versionName="4.3.23 (1069729-030)" >
图书馆说明minSdk
也 9 。
收到错误:
Unexpected error while performing partial evaluation:
Class = [com/google/android/gms/common/GooglePlayServicesUtil]
Method = [showErrorDialogFragment(ILandroid/app/Activity;ILandroid/content/DialogInterface$OnCancelListener;)Z]
Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [com/google/android/gms/common/ErrorDialogFragment] (not even immediate super class [android/app/DialogFragment]))
java.lang.IllegalArgumentException: Can't find any super classes of [com/google/android/gms/common/ErrorDialogFragment] (not even immediate super class [android/app/DialogFragment])
在我的proguard文件中找到了与gms相关的内容:
-dontwarn com.google.android.gms.**
-keep class com.google.android.gms.** { *; }
-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;
}
在API级别11中添加了 DialogFragment
。这是服务库的失败还是我遗漏了什么?
感谢。
答案 0 :(得分:1)
您应该针对包含缺少的类的API级别11进行构建。库本身可能具有旧API的后备模式,但ProGuard仍需要处理整个应用程序,包括更新的代码。