gpt4 book ai didi

android - Android 模拟器 4.2.2 或更高版本上的 Google Play 服务。 "Google Maps API demos won' t 运行,除非你更新谷歌播放服务”

转载 作者:太空宇宙 更新时间:2023-11-03 12:17:14 25 4
gpt4 key购买 nike

这里有一些相关的线程,但这些解决方案不起作用:

1. Running Google Maps v2 on the Android emulator

2。 How to run Google Map API V2 on Android emulator

我什至关注了 Google Developer 的有关此问题的文档。还是什么都没有。

To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK. If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.

To test your app when using the Google Play services SDK, you must use either:

  • A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
  • The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.

我正在使用高于 Android 4.2.2 的模拟器 Android 5.1.1,但是当我为 map 运行示例代码时,我在模拟器上收到一条消息:

“除非您更新 Google Play 服务,否则 Google Maps API 演示不会运行”

它给了我一个更新选项,但是当我点击它时,我在模拟器的屏幕上看到了这条消息:

“不幸的是,Google Maps API 演示已停止”

任何人都可以阐明这个问题吗?我可以在真实设备上进行设置并进行测试,但我更愿意使用 Android 模拟器,因为它的速度要快得多。

最佳答案

确保您使用 Google API (Google Inc.) 作为模拟器的目标。如果这不能解决问题,您可以用谷歌搜索最新的 Google Play Services' apk 并通过 adb install 安装它。

=-=-=编辑=-=-=
API 级别 22 模拟器上似乎存在关于 Google Play 服务的错​​误。我为它提交了一个错误。
https://code.google.com/p/android/issues/detail?id=176348&thanks=176348&ts=1433887196

Google Play 服务在 API 21 和 API MNC 上似乎没问题

关于android - Android 模拟器 4.2.2 或更高版本上的 Google Play 服务。 "Google Maps API demos won' t 运行,除非你更新谷歌播放服务”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30699662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com