Reputation: 457
I am receiving an exception mentioning to add meta-data but even after adding it I still receieve the same exception. Could you please help me how I can repel it?
01-08 20:22:05.380: E/AndroidRuntime(2335): 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
<application> element: <meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
As it was wanted here you could see my AndroidManifest is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemapv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.googlemapv2.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyColV0vSkdC8PmLLy4DiqiK-p-gXzUo-Ng"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
Upvotes: 1
Views: 4975
Reputation: 874
try putting this instead.
<meta-data
android:name="com.google.android.gms.version"
android:value="4030500" />
If that doesn't work, take a look at this. Maybe you have an older version of GMS or it's not being linked correctly to your project.
Adding Google Play services version to your app's manifest?
Upvotes: 1