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

Apps Google Maps Activity - won't run unless you update Google Play services

DaftEejit

Lurker
Hello there,
Pretty much a newbie to Android but have programmed before. Cutting to the chase, I'm trying to run the template Google Maps activity in Android Studio 1.5. I've done the API key thing and pasted my key into google_maps_api.xml.

When I run a Nexus5 emulator (x86 or x86_64) I get the error <Appname> won't run unless you update Google Play services.

In the logcat window there is a whole heap of message like ' W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8185480'.

The weird thing is that I always choose as Google API image for the AVD's, but when I later 'edit' them they have changed back to Android API images. I'm guessing that this is the reason for the error mesasge.....

Any idea why it keeps changing back?
 
Last edited:
Please someone help!!!!!

I've tried all sorts of things (mostly in the deleting and re-installing kind of realm) and am getting absolutely no-where.

Additionally I've noticed that on re-installation of the entire Android system I got:
Installing Archives:
Preparing to install archives
Installing SDK Platform Android 6.0, API 23, revision 2
Failed to rename directory C:\Users\Iain\AppData\Local\Android\sdk\platforms\android-23 to C:\Users\Iain\AppData\Local\Android\sdk\temp\RemotePlatformPkgInfo.old01.

and double clicking on the activity_maps.xml file I get a rendering issue
The following classes could not be found:
-android.support.v7.internal.app.WindowDecorActionBar

oh and I keep getting

'Unfortunately Launcher3 has stopped' on running my nexus 5 emulator
 
So it seems to be running now. It might be worth explaining what I had to do to sort this problem out......

Even though editing AVD's I set up with Google API targets showed them as associated with NON Google API targets - if I looked at the AVD 'config' files they actually did show an association to the Google API's (files located in C:\Users\<user>\.android\avd\Nexus_5_API_23.avd - for example). This line in the file makes that clear...

image.sysdir.1=system-images\android-23\google_apis\x86\

So this was not the problem, but is probably a bug with the AVD Editor

The next thing was to look at the error being produced in the Android Monitor when I ran the app against my emulator

'W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8185470'

It looked like perhaps the app was requiring a version of the google API's that wasn't available on the emulator (the 'required' number was bigger than the 'found' number), so I modified the 'build.gradle (Module: app) file to change this line:

"compile 'com.google.android.gms : play-services:8.3.0'"
to:
"compile 'com.google.android.gms : play-services:8.1.0'"

(compile 'com.google.android.gms : play-services:8.2.0' didn't compile!!)

and this is what nailed the problem in the end. So I guess these AVD's don't have google play 8.3 in them - in other words android studio can compile apps that the avd's can't run because the dependencies don't line up!!!!

hmmmm.... not good
 
Back
Top Bottom