Proguard的失败,与谷歌Play服务库 [英] Proguard fails with Google Play Services library
问题描述
我无法建立我的包的Proguard
更新谷歌播放服务
库后启用。我的项目的minSdkVersion
为 9 。我使用的服务的lib下面的版本:
I'm unable to build my package with Proguard
enabled after updating Google Play Services
library. My project minSdkVersion
is 9. I am using following version of services 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])
随着相关GMS是在我的ProGuard文件中找到:
Following related to gms is found in my proguard file:
-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;
}
DialogFragment
在API级别11加入这是与服务库失败还是我失去了一些东西?
DialogFragment
was added in API level 11. Is this a failure with the services library or am I missing something?
感谢。
推荐答案
您应该建立对包含缺少的类API级别11。库本身可能有老年API的后备模式,但仍ProGuard的需要处理整个应用程序,包括新的code。
You should build against API level 11 that contains the missing class. The library itself probably has a fallback mode for older APIs, but ProGuard still needs to process the entire application, including the newer code.
这篇关于Proguard的失败,与谷歌Play服务库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!