在Genymotion虚拟机上安装Google Apps


Genymotion 来自于 AndroVM 这个开源项目,基于 x86 和 VirtualBox,支持 OpenGL 加速,可以用于 Mac / Win / Linux 然而最近发布的新版,新增了拖拽安装 apk功能,但是移除了 Google 市场。

导致运行带有Google Play Services 之类应用时提示:

Google Maps API Demos won't run without Google Play services,which are missing from your phone.

Get Google Play Services

下载安装不在赘述,只解决Genymotion模拟器不支持谷歌服务问题:

安装 Google 市场 和 ARM 库

前面说过,新版Genymotion移除了 Google 市场。实际上,对 ARM library 的支持也一并移除了:

Both the “Google apps” and the “ARM library support” features are removed.

 1. 安装 ARM Translation(提供 ARM 支持)的步骤:

  • 下载ARM Translation Installer v1.1 

  • 安装下载的文件(直接把 zip 文件拖进虚拟机,不要解压),安装完关闭虚拟机再打开;
 2. 安装 GApps(含 Google 市场的步骤:
  • 下载对应版本的GApps:
官网:http://www.teamandroid.com/gapps/,根据对应API版本自行下载。
  • 安装下载的文件(拖拽到虚拟机,一路next 。重启,ok ! );

 3. 版本过低问题

如果下载完成后在模拟器上已经可以看到Google play ,

但是运行应用时提示更新,需要登录邮箱,下载最新的Google Play service:

        

这样,Google Play 和其他 Google App 都有了;再安装Google Map应用也不会报错了。



使用 Mac 的同学请注意

Genymotion 依赖的 Virtualbox 虚拟机,和 Mac 系统下另一个著名的虚拟机软件「Parallels Desktop」没办法同时使用。Parallels Desktop 官方说无解

No workaround is available. Please try not to use Parallels Desktop and Virtual Box at the same time

所以每次使用 Genymotion,必须先关掉 Parallels Desktop;同样,要使用 Parallels Desktop,也得关闭 Genymotion。

问题是:关闭 Genymotion,Virtualbox 某些进程并不会自动退出。所以我们要手动结束 Virtualbox 所有进程,才能正常运行 Parallels Desktop。我写了一个「Kill Virtualbox」的 Alfred Workflow 专门干这事,其实就一行:

kill -9  $(ps -ef|grep VirtualBox|awk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')

总的说来,除了与 Parallels Desktop 兼容性问题这点小不爽之外,Genymotion 各方便都令人满意,强烈推荐。

update: 升级到 2.0.2 之后,直接关闭 Genymotion 可以同时退出所有 VirtualBox 进程,不需要上面那么复杂了。






  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值