The metadata tag in AndroidManifest.xml does not have the correct value

advertisements

I get this error when trying to run the app:

Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 7095000 but found 6587000. 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" />

But that line of code is in my manifest sorry still noob at android

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.topgame.blackjackgfree1"
  android:versionCode="2"
  android:versionName="1.0">

  <uses-sdk android:minSdkVersion="10"/>
  <uses-feature android:glEsVersion="0x00020000" />

  <uses-permission android:name="com.android.vending.BILLING" />
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.GET_ACCOUNTS" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

  <supports-screens android:xlargeScreens="true"
  android:largeScreens="true"
  android:smallScreens="true"
  android:anyDensity="true"
  android:normalScreens="true"/>

  <application android:label="@string/app_name"
      android:icon="@drawable/icon"
      android:hardwareAccelerated="true"
    android:allowBackup="true"
    >

      <meta-data android:name="com.google.android.gms.games.APP_ID"
                 android:value="@string/app_id" />
      <meta-data android:name="com.google.android.gms.version"
                 android:value="@integer/google_play_services_version"/>

      <activity android:name="com.topgame.test.MainActivity"
          android:label="@string/app_name"
          android:screenOrientation="landscape"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
          android:configChanges="orientation|keyboardHidden"
          android:windowSoftInputMode="stateHidden">
          <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
              <category android:name="android.intent.category.DEFAULT" />
          </intent-filter>
      </activity>

      <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
      <activity android:name="com.greystripe.sdk.GSFullscreenActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
      <activity android:name="com.mdotm.android.view.MdotMActivity" android:launchMode="singleTop"/>
      <activity android:name="com.chartboost.sdk.CBImpressionActivity" android:excludeFromRecents="true" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"  />
      <activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation"/>
      <activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation"/>
      <activity android:name="com.mopub.mobileads.MraidBrowser" android:configChanges="keyboardHidden|orientation"/>
      <activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation"/>

  </application>

</manifest>


you don't have the updated version. you need to update from SDK manager. if you work with android studio you can do it do it automatic by define in gradle file like this:

dependencies {
    compile 'com.android.support:support-v13:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
}

if you work with eclipse, you need to remove the oldest google play services and bring the new from android sdk/extras