1

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>
Ark
  • 457
  • 1
  • 8
  • 18
  • can you post your AndroidManifest.xml file? – Vinnie Jan 09 '14 at 01:30
  • try to add the following under your tag – Eddy K Jan 09 '14 at 01:32
  • Clean the project, delete the app from your phone and try again – Eddy K Jan 09 '14 at 01:34
  • http://stackoverflow.com/questions/19735507/google-play-services-v13-error-meta-data-in-androidmanifest – Eddy K Jan 09 '14 at 01:35
  • Eddy K, Thanks for reply, as I said, however I have added it in the AndroidManifest.xml, I am still receiving the same exception. – Ark Jan 09 '14 at 01:44
  • I posted an answer, try to put the actual value and see if it works. – Eddy K Jan 09 '14 at 01:48
  • did the solution work? – Eddy K Jan 09 '14 at 17:42
  • Yes it worked worked with SDK version 19,however it is not working with SDk version 16 and still same exception is happening!.. Thanks for your reply. – Ark Jan 09 '14 at 23:56
  • possible duplicate of [After Google Play Service update to version 13 I got an error](http://stackoverflow.com/questions/19723811/after-google-play-service-update-to-version-13-i-got-an-error) – laalto Jan 12 '14 at 08:20

1 Answers1

1

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?

Community
  • 1
  • 1
Eddy K
  • 874
  • 6
  • 12