“This app won't run unless you update google play services” alert

六月ゝ 毕业季﹏ 提交于 2019-12-30 05:44:04

问题


I am getting "Update Google Play Services" alert when running project on emulator. If I click OK then there is one more alert behind it. I keep clicking OK and there are tons of alerts already popped up and I end up giving up.

Message looks as below :

I've tried updating everything in SDK manager. Also tried in Eclipse, Help->Check for updates.


回答1:


Updated: Jun 27 2019:

The new google x86 emulator with play services is exactly like a device where you can install apps from play store and all other things.

Previous Answer:

I faced similar problem while trying google maps in emulator. While some people have been able to run google play services in their emulator by downloading google play services application from their mobile, making the apk file and then installing that file in emulator, it is really complicated process and works for certain api level only. Same is the case with emulator using google api's that shift with builtin maps and google play services. The maps application will work in emulator while your application asks for update to google play services. So the wise thing to do is to test it in real hardware.




回答2:


For me, I had to go to settings | apps on my emulator and then find Google Play Services, I then saw that the version number was no where near the current version number (6.7.74 as against the current 7.3.0)

I then went to my dependencies and changed:

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

to

compile 'com.google.android.gms:play-services:6.+'

You'll get warnings saying a newer version is available and to avoid using + in version numbers but if you've spent the entire day looking for a solution like I did, you could care less.




回答3:


In android studio changing the depencies work for me:

com.google.android.gms:play-services:5.+

to:

com.google.android.gms:play-services:5.0.+




回答4:


Now you can also use your emulator to run Android MAP API V2.

Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services.

The problem here is that you have an older version of Google Play Services. Update to the latest version by opening the SDK Manager => Extras => Google Play Services.




回答5:


you can try using new Genymotion Android emulator in which you can update google play services. I have faced this alert and able to update it.

It seems like we can't test latest Google maps API, which is dependant on google play store app which is missing in Google's Android Emulator.

Genymotion Android Emulator comes with Google Play store app.

NOTE: Genymotion v2.0 discontinued packaging virtual machine with google apps , but refer this link to add Google Apps Manually to Genymotion




回答6:


I had the same issue. It's nice that in the newer emulators (for version 17 and up) come with the play services included, but what about older versions?

eventually i found the emulators provided by testobject. all their emulators (starting at version 15) come with the updated play services and google APIs (maps v2 etc'), for both ARM and x86.




回答7:


Check this answer https://stackoverflow.com/a/19734573/3284964. It helped me. For me it works on 4.3 emulator (google play services release 3.2.65) and google play services for froyo lib in my app.




回答8:


I had a problem with Android Studio when it imported my Eclipse project.

Look for Google Play Services in your build.gradle.

dependencies { compile 'com.google.android.gms:play-services:+' }

Change this to use an exact version:

dependencies { compile 'com.google.android.gms:play-services:5.0+' }

Then clean build (Build -> Clean Project).




回答9:


Just did some checking and I realise this question is quite old but, it seems API19 Google Apis Disk Image works with Google Play Services just tested it with an application im working on and it shows the Goolge Maps V2 just fine.




回答10:


(Only for Android Studio Users)

I have faced the same problem and solved it by updating Android Studio and SDK libraries.



来源:https://stackoverflow.com/questions/19358535/this-app-wont-run-unless-you-update-google-play-services-alert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!