• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Why won't the default Maps app recognize Google Play services?

Jamil_NYC

Lurker
I want to learn more about location awareness in apps. So I started with the default Google Maps project in Android Studio, without any code changes. I obtained a key from Google API's for maps and put that in my resources. After that, I ran the app expecting it just show me a map of where I am currently located.

However, when the app starts up in the emulator, I get a message telling me that the app "won't run unless you update Google Play services." After I saw that, in Android Studio I went to Tools > Android > SDK Manager > SDK Tools and saw that both Google Play services and Google Repository were already installed. The emulator is running Android 7.1.1 with API Level 25.

In the Android Monitor I see this line repeatedly:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 10084000 but found 9879470


So it seems like Google Play services needs to be updated, but I don't see an option for that in the SDK manager. So what can I do to fix this problem?

Also, in my app build.gradle file, I have the following dependency:

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

Thanks in advance for any tips.
 
Have you tried a clean build (rebuild) of your project?

Hi, thanks for replying. Yes I've done a clean rebuild, restarted the IDE, my computer, etc. I even went so far as to completely trash the project and just start from scratch. That wasn't really a problem since the only change I made from the default was adding my Maps API key.

I was searching around and it could be that inside the emulator, Google Play services are version 9.8.79 but in my gradle file I have version 10.0.1. I tried changing the version in the gradle file, but it complains that it can't find that version and it is not available for download.

Any other suggestions?
 
Back
Top Bottom