Android:Google Play 服务无法在模拟器上运行 [英] Android: Google play services not working on the emulator

查看:121
本文介绍了Android:Google Play 服务无法在模拟器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须格式化我的 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.

现在,当我启动 Android Studio 和 SDK Manager 时,一切看起来都很好,所有工具和软件包显示为已下载,但是当我启动模拟器来测试我的应用程序时,它显示 Get Google Play Services 我已经在我的 gradle 中,如下所示:

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:play-services:7.0.0'

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

它在旧的 Windows 机器上运行良好,但现在它拒绝检测 Google Play 服务.

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.

我在这里缺少什么?

提前致谢.

推荐答案

emulator 上缺少 Google Play Services 应用程序.该库仅用于针对 Google Play 服务 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'.

根据 设置 Google Play 服务:

如果您想在模拟器上测试您的应用,请展开目录Android 4.2.2 (API 17) 或更高版本,选择 Google API,以及安装它.然后创建一个以 Google API 为平台的新 AVD目标.

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.

所以您需要做的是使用 Google APIs 作为目标 SDK 设置.

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

这篇关于Android:Google Play 服务无法在模拟器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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