BadParcelableException in android.gms.maps on release but not in debug mode

186 views Asked by At

My app crashes when accessing to an activity that uses google maps (v.2). I am getting android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.maps.f

This happens only in release mode, but there is no error or warning in logs when I am in debug mode.

I am using Proguard on Eclipse IDE to obfuscate the code, so I guess this could be the problem. I have googled around but I have not found a possible solution

1

There are 1 answers

1
MaciejGórski On

Try using proguard.cfg from Google Maps Android API v2 samples.

It is located in ANDROID_SDK/extras/google/google_play_services/samples/maps.

This part is what you want to include:

# The maps library 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;
}

but maybe other too.