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 进程,不需要上面那么复杂了。






Logo

新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐