From 5fe44955cf583b7944c3a6e13c7021aa150f11e5 Mon Sep 17 00:00:00 2001
From: Rich Slogar In this document
@@ -192,6 +192,17 @@ you include an API that does have a separate library.)
Note: ProGuard directives are included in the Play services
+client libraries to preserve the required classes. The
+Android Plugin for Gradle
+automatically appends ProGuard configuration files in an AAR (Android ARchive) package and appends
+that package to your ProGuard configuration. During project creation, Android Studio automatically
+creates the ProGuard configuration files and build.gradle
properties for ProGuard use.
+To use ProGuard with Android Studio, you must enable the ProGuard setting in your
+build.gradle
buildTypes
. For more information, see the
+ProGuard topic.
To prevent ProGuard from stripping away
+required classes, add the following lines in the
+<project_directory>/proguard-project.txt
file:
+
+-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; +} ++ + +
Note: When using Android Studio, you must add Proguard
-to your build.gradle
file's build types. For more information, see the
-Gradle Plugin User Guide.
-
+
+
+