简体   繁体   English

Android Genymotion 位置(Google 服务 API)不起作用

[英]Android Genymotion Location (Google Services API) doesn't work

I installed Google Services API in my Genymotion and after I downloaded the location example ( https://github.com/googlesamples/android-play-location/tree/master/BasicLocationSample ) and it doesn't work, I set GPS and Data abled.我在我的 Genymotion 中安装了 Google 服务 API,在我下载了位置示例( https://github.com/googlesamples/android-play-location/tree/master/BasicLocationSample )后,它不起作用,我设置了 GPS 和数据有能力的。 I tested it on my real phone and it works!我在我的真实手机上测试了它,它可以工作! How to fix?怎么修?

Google Maps find me on map.谷歌地图在地图上找到我。

Make sure the emulator has Google Play Services installed, and that it's up to date.确保模拟器安装了 Google Play 服务,并且是最新的。 You can update it to the latest version from the Play Store您可以从 Play 商店将其更新到最新版本

If Google Play Services on Android 6.0 crash everytime, you can try do the same things in this sequence.如果 Android 6.0 上的 Google Play 服务每次都崩溃,您可以尝试按此顺序执行相同的操作。 Maybe it will work.也许它会起作用。

Here is what I did:这是我所做的:

  1. Install a latest Genymotion (version 2.6.0 in my case).安装最新的 Genymotion(在我的例子中是 2.6.0 版)。 Make sure the previous old (preview) Android 6.0 images are removed(Genymotion -> Settings -> Misc -> Clear cache).确保删除以前的旧(预览)Android 6.0 图像(Genymotion -> 设置 -> 其他 -> 清除缓存)。
  2. Add a new virtualdevice, select Google Nexus 5X and Android 6.0 image.添加新的虚拟设备,选择 Google Nexus 5X 和 Android 6.0 映像。 It should download a new image from Genymotion website.Start created Google Nexus 5X - 6.0.0 - API 23 - 1080x1920 virtual device.它应该从 Genymotion 网站下载一个新图像。开始创建 Google Nexus 5X - 6.0.0 - API 23 - 1080x1920 虚拟设备。
  3. Flash Genymotion-ARM-Translation_v1.1.zip (drag&drop the zip file to virtual device window) and then restart the virtual device. Flash Genymotion-ARM-Translation_v1.1.zip(将zip文件拖放到虚拟设备窗口)然后重启虚拟设备。
  4. Flash gapps-L-4-21-15.zip and restart the virtual device again.刷入 gapps-L-4-21-15.zip 并再次重启虚拟设备。 Now add Google account in the virtual device via Settings -> Accounts -> Add account.现在通过设置 -> 帐户 -> 添加帐户在虚拟设备中添加 Google 帐户。 Do not start Google Play!不要启动 Google Play! Ignore any crashes in sign in process.忽略登录过程中的任何崩溃。
  5. Flash benzo-gapps-M-20151011-signed-chroma-r3.zip and restart the virtual device.刷入 benzo-gapps-M-20151011-signed-chroma-r3.zip 并重启虚拟设备。 Open Google Play in virtual device,update all installed applications.在虚拟设备中打开 Google Play,更新所有已安装的应用程序。
  6. Start Google Now with long touch on home button to force dialog with request to update Google Play Services.长按主页按钮启动 Google Now 以强制对话以请求更新 Google Play 服务。 Update Google Play Services.更新 Google Play 服务。 Now the device is prepared with working Google Play and Google Play Services.现在设备已准备好运行 Google Play 和 Google Play 服务。

Genymotion android 6.0 with Google play service Genymotion android 6.0 与谷歌播放服务

  1. Check your map is updated.检查您的地图是否已更新。
  2. Check your PC location settings.检查您的 PC 位置设置。

To use Google Services Api in your genymotion you must follow this steps:要在您的 genymotion 中使用 Google Services Api,您必须按照以下步骤操作:

1) Download the ARM Translation Installer v1.1(ARMTI) 1) 下载ARM Translation Installer v1.1(ARMTI)

2) Download the Google Apps for your specific Android version. 2) 下载适用于您特定 Android 版本的Google Apps

3) Drag and drop ARM Translation zip file to your emulator. 3) 将 ARM Translation zip 文件拖放到您的模拟器中。

4) Reboot your emulator 4) 重启你的模拟器

5) Drag and Drop the correct Google App version to your emulator 5) 将正确的 Google App 版本拖放到您的模拟器

6) Reboot your emulator 6) 重启你的模拟器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM