【问题标题】:Unable to run Google map in application running in Emulator无法在模拟器中运行的应用程序中运行 Google 地图
【发布时间】:2018-08-24 14:18:15
【问题描述】:

我收到错误:

除非您更新 Google Play 服务,否则 AppName 不会运行。

更新

模拟器没有显示更新 Google Play 服务的选项。


配置

模拟器:

  • Android 8.1(奥利奥)

  • Google API 英特尔 x86 Atom 系统映像。

以下已安装:

  • 构建工具 27.0.3

  • Android 模拟器 27.2.0

  • Google Play 服务(第 48 版)

在 Ubuntu 上运行的 Android Studio 3.1 Canary 9。

在这个网站上尝试了很多解决方案,但都没有成功。

【问题讨论】:

标签: android android-studio android-emulator kotlin android-8.0-oreo


【解决方案1】:

您必须拥有一个包含 Google API 的模拟器。根据您项目中使用的 Google Play 服务库的版本,您可能需要包含 Google API 的更高 API 级别的模拟器。 包含 Google API (Google Play) 的 Android 8.0(API 级别 26)模拟器就足够了。

Like this image

【讨论】:

    【解决方案2】:

    现在有更好的解决方案:使用带有内置 Google Play 服务的 AVD 图像。它将使您能够使用包括 Google Play 在内的 Google 服务。此外,您无需重新创建 AVD 图像即可对其进行更新。

    欲了解更多信息,请查看此帖子

    https://www.google.com.pk/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/14536595/how-to-download-google-play-services-in-an-android-emulator&ved=2ahUKEwjwz76G5u7ZAhUMCuwKHdVFAH4QFjADegQIBxAB&usg=AOvVaw1NNhhmar8bv8PoXT5o9B0q

    【讨论】:

      【解决方案3】:

      您使用具有如图所示 Playstore 的模拟器。

      【讨论】:

      • 谷歌地图不应该运行那些没有Play Store的人吗? Google 地图只需要 Google Play 系统映像。对吗?
      • 您在应用中使用 Play 服务,因此您只能在具有 PlayServices 的设备中运行
      猜你喜欢
      • 1970-01-01
      • 2014-12-11
      • 1970-01-01
      • 2014-02-16
      • 2021-09-18
      • 2011-06-25
      • 1970-01-01
      相关资源
      最近更新 更多