2

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)" > 

The library states minSdk also 9.

And getting error:

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]) 

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 was added in API level 11. Is this a failure with the services library or am I missing something?

Thanks.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

For a quick solution, I took older maps library to use, but most likely this works, I just need to handle all coming deprecations and API changes properly.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.