Google maps aren't loaded after ProGuard Obfuscation in Eclipse

Edit: For Google Maps For Android V2 Specifically:

Just in case anyone sees this and has a similar issue - I was getting a Parcelable RuntimeException when I tried to view a second map (as in, Activity A had a map instance, then moving to Activity B, another instance with different params), pointing to what i was assuming was an obfuscated class name in the google package.

after i added

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

to my proguard-project.txt everything seemed to keep working as normal


It is most likely issue with the Maps API Key. You should generate the Key with the signature used while exporting the app and use it in your map view.
Its unlikely that Obfuscation using ProGuard will affect the map rendering.

Tags:

Android