1

I am trying build my APP I am getting the following error: All this time App used to generate the build properly.

After I upgraded my compileSdkVersion and build to 23, GMS to 8.1, AsyncHttpclient to 1.4.9. I am getting the following error.

Not sure what to do:

  Warning:com.google.android.gms.internal.zzac: can't find referenced class android.net.http.AndroidHttpClient
    Warning:com.google.android.gms.internal.zzw: can't find referenced method 'void addHeader(java.lang.String,java.lang.String)' in program class com.google.android.gms.internal.zzw$zza
    Warning:com.google.android.gms.internal.zzw$zza: can't find referenced method 'void setURI(java.net.URI)' in program class com.google.android.gms.internal.zzw$zza
    Warning:there were 2 unresolved references to classes or interfaces.
             You may need to add missing library jars or update their versions.
             If your code works fine without the missing classes, you can suppress
             the warnings with '-dontwarn' options.
             (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
    Warning:there were 2 unresolved references to program class members.
             Your input classes appear to be inconsistent.
             You may need to recompile the code.
             (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
    :app:proguardRelease FAILED
    Error:Execution failed for task ':app:proguardRelease'.
    > java.io.IOException: Please correct the above warnings first.

What could be wrong here?

user5287166
  • 223
  • 1
  • 2
  • 15

1 Answers1

0

If you havent added command in progruard yet then add.

-keep class com.google.android.gms.maps.** { *; }
-keep interface com.google.android.gms.maps.** { *; }

If you are using map you should check developer site. There is proguard in it already.

For map you may need to add below code. if you havent added.

# The Maps API uses custom Parcelables.
# Use this rule (which is slightly broader than the standard recommended one)
# to avoid obfuscating them.
-keepclassmembers class * implements android.os.Parcelable {
    static *** CREATOR;
}

# The Maps API uses serialization.
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

-dontwarn com.google.android.maps.GeoPoint
-dontwarn com.google.android.maps.MapActivity
-dontwarn com.google.android.maps.MapView
-dontwarn com.google.android.maps.MapController
-dontwarn com.google.android.maps.Overlay
-dontwarn com.google.android.gms.maps.model.*
Shvet
  • 1,159
  • 1
  • 18
  • 30