不工作在模拟器上谷歌播放服务:安卓 [英] Android: Google play services not working on the emulator

查看:169
本文介绍了不工作在模拟器上谷歌播放服务:安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不格式化我的Windows笔记本电脑,所以我复制的SDK文件夹(因为它是约30 GB大),我粘贴它在新的Windows副本的同一个地方。

I had to format my Windows laptop so I copied the SDK folder (because it's about 30 GB large) and i pasted it in the same place on the new Windows copy.

现在,当我开始的Andr​​oid Studio和SDK管理器一切正常,所有工具和放大器;软件包显示为下载的,但是当我开始一个模拟器来测试我的应用程序,它说获取谷歌播放服务,我已经在我的摇篮如下:

Now when I start Android Studio and SDK Manager everything looks fine and all tools & packages appear as downloaded, but when I start an emulator to test my app, it says Get Google Play Services which I already have in my gradle as follows:

编译com.google.android.gms:播放服务:7.0.0

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

这是工作的罚款旧的Windows计算机上,但现在它拒绝检测谷歌播放服务

It was working fine on the old Windows machine but now it refuses to detect Google Play Services.

另外,仿真器是很慢的,它使用的是非常快的旧的Windows机器上。

Also the emulator is very slow, it used to be very fast on the old Windows machine.

我在想什么吗?

在此先感谢。

推荐答案

谷歌播放服务应用程序缺少的的模拟器的。该库只需要对谷歌播放服务API编译项目。

The Google Play Services app is missing on the emulator. The library is required only to compile projects against the Google Play Services APIs'.

根据参考文档的 设置谷歌播放服务

As per the reference documentation at Setting Up Google Play Services:

如果你想测试在仿真器中的应用程序,展开目录   安卓4.2.2(API 17)或更高版本,选择谷歌的API,以及   安装。然后创建一个新的AVD与谷歌的API为平台   目标。

If you want to test your app on the emulator, expand the directory for Android 4.2.2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.

所以,你需要做的是使用的谷歌的API 的作为目标SDK设置。

So what you need to do is use the Google APIs as the target SDK setting.

这篇关于不工作在模拟器上谷歌播放服务:安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆