Google Play services out of date. Requires 7571000 but found 6774470

15.4k views Asked by At

Im trying to add google play API to my android game and i followed the instructions in their site.

I got this error in the emulator run, trying to solve it. (on my phone the app just crash)

In the manifest:

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

In the Version.xml

<integer name="google_play_services_version">7571000</integer>

and i got all the necessary packages installed.

What the problem may be?

Comment: it's installed

5

There are 5 answers

1
Xue Jing On BEST ANSWER

Add the below script in dependencies.gradle, it will download the latest play service lib automatically, and you can find them on local path such as: m2repository/com/google/android/gms/play-services.

dependencies {
  compile 'com.google.android.gms:play-services:4.2.+'
}
0
c-romeo On

Didn't specify what IDE you use?
- In case of gradle / Android studio you can check and configure in build.gradle file, setting 1, as described here, other settings are not necessary and can be removed.
- In case of other IDE / Eclipse check project references and correlate jar file from lib folder with @integer/google_play_services_version value from sdk project.
eclipse project properties

Check the following settings:

  1. in build.gradle

    dependencies {  
        compile 'com.google.android.gms:play-services-base:7.5.0@aar'  
    
  2. in AndroidManifest.xml, usually should add in your project manifest file

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    
  3. in res/values/version.xml from referenced sdk project or included in your own project manifest file

    <resources>
        <integer name="google_play_services_version">7571000</integer>
    </resources>
    

To find out what version can be used in build.gradle or to download specific version of google play services sdk , check here and here.

2
Varun Agarwal On

Google Play services needs to be listed as a dependency in the code (which you have done) and also on the device/ emulator that you are using.

When creating the virtual device, go to *AVD --> Create virtual device --> new hardware profile --> next --> select the image as per requirement. You should have an option of seeing the google play services version. If that isnt high enough then you probably dont have the images needed which can be downloaded from android SDK

EDIT : Sorry i meant to type AVD and not ADB. Android Virtual Device Manager is a mobile icon with some green circles below it located on top right corner. This is used to launch new emulators with select hardware settings. These settings are downloaded from the android SDK in form of system images under the different APIs

1
Veeresh On

I have found the solution which worked for me. Assuming that your are using the Google Maps V2 API you need to get the API Key from [https://code.google.com/apis/console/][1]

Make sure you have the following in Android Manifest.xml:

 <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSyA7xyeYSyonpXb6cqrmrBOCmKGd8q6FOlI" />
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
0
Juan José Melero Gómez On

In my case I'm working with wearables and I must use the Google Play Services wearable library:

compile 'com.google.android.gms:play-services-wearable:7.5.0'

I was getting the message Google Play services out of date. Requires 7571000 but found 7327534 in the log.

And the watch suggested updating Android Wear and automatically run it on the phone. But Android Wear couldn't be updated since there were no more updates available, so in the end I changed the library version from 7.5.0 to 7.3.0 and it worked.