26
votes

I am attempting to utilize the Google Places API's PlacePicker in my Android app. However, whenever I attempt to create the picker, I receive the following error message:

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

Unfortunately, I am tied to testing on the emulator because I do not own a physical device. The emulator's image is API level 22 x86 with Google APIs target. Furthermore, I have attempted to include the Google Play Services library through the build.gradle file:

'com.google.android.gms:play-services:7.+'

Also, I have updated Google Play Services in the SDK Manager. What am I doing wrong? How can I update my Google Play services so I can use the Places API?

9
Check the solution of this question: stackoverflow.com/questions/25809435/…Najeebullah Shah
I checked that question's solution, but I am already using the newest emulator image anyways so I don't think it helps.user1594328
Might be here you will find your solution [1]: stackoverflow.com/questions/29429727/…Abhishek
i'm having the same problem (Requires 7327000 but found 6774470).. any solution?Matias Elorriaga

9 Answers

15
votes

I had the same issue, and had to move down to API 21 emulator image with google apps. That one is more up to date, and works.

9
votes

If the SDK Manager shows that you already have the latest version installed, you can simply duplicate your emulator definition.

The duplicated emulator will be loaded with the latest version of the SDK.

enter image description here

3
votes

I have a similar problem when I use Google-Play-services on android wear, then I solve it by updated my android wear app version. (because newer android wear version include newer Google-Play-services)

This problem cause by the version of Google-Play-services on your device is too old, you should update your version of Google-Play-services on your device.

For the emulator, you need to update Google-Play-services on your emulator instead of update your SDK.

2
votes

I had the same problem and right now I "updated" the version to 6774480 invalidating the caches and restarting, then i "downgraded" the dependecies compile 'com.google.android.gms:play-services:6+' and it works, I know that is not a real solution but is a bad way to make it works so I can test my app

2
votes

As others said, the reason is likely to be the Google Play installed in the AVD doesn't match dependency requirement. Besides the solutions suggested by others, I tried to lower my required Google Play version to 8.1 from 8.3, and the problem is solved.

0
votes

I only had this issue with the API 22 emulator. 21 and 23 were fine and I had no issues with physical devices.

I was curious to know whether or not this low version was critical for GCM, so modified the code to proceed anyway:

if (checkPlayServices()) {
              // Start IntentService to register this application with GCM.
              Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
              startService(intent);
} else {<<--   Added this as a bypass as my emulator complained about versions
              Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
              startService(intent);
}

Interestingly, the API 22 emulator got a token from GCM and received downstream push messages without any problem.

0
votes

This is a workaround that I came up with since none of the solutions here worked for me. Also, I didnt want to update my code to use an older version of play services. I ended up installing the emulator with google play instead of google apis and then when the prompt came up I simply clicked update. This would take you to the google play store and all you have to do is update play services from there. Only caveat here is that this method requires you to sign in to the emulator with a google account. But for my use cases it was sufficient. Google play instead of google api

0
votes

my logcat is

Google Play services out of date. Requires 12210000 but found 11947270

so I changed the code of build.gradle

implementation 'com.google.android.gms:play-services-maps:12.0.0'

to

implementation 'com.google.android.gms:play-services-maps:11.0.0'

and it works

-1
votes

Update your packages in Tools > Android > SDK Manager and then check all the packages in Extras that have an update available.

After you have done this use the following dependency in your (app) build.gradle

compile 'com.google.android.gms:play-services:7.3.0'