New Meta-Data Tag for Maps V2
If, when trying to use the new Google Play Services SDK, you encounter an error message like:
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 0. You must have the following declaration within the element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
follow the instructions and add the following
<meta-data> tag to your
manifest, alongside the existing
<meta-data> tag for your API key:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
For whatever reason, this does not appear to be covered in the current documentation, or the release notes.
Note that I have not tried any anything else from the new Play Services SDK
yet, so it is entirely possible that this is also required for other
facets of that SDK (GCM,
Many thanks to StackOverflow user Benoit for pointing this out and helping to spread the word!
Need Android app development training for your team? Mark Murphy has trained hundreds! Learn more!