【问题标题】:how to update Google Play service on Emulator android studio如何在 Emulator android studio 上更新 Google Play 服务
【发布时间】:2016-11-18 11:23:30
【问题描述】:

我得到了钥匙并设置了限制,但我仍然无法在模拟器上打开地图。在build.gradle上,我看到google play服务现在是9.8.0,我认为这是最新的。但是,当我运行示例应用程序时,它说我需要更新 Google Play 服务?

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-maps:9.+'

}

我检查了 Android 模拟器,它没有 Play 商店。是失踪的那一个吗?我按照这个链接 https://developers.google.com/maps/documentation/android-api/start#step_2_install_the_google_play_services_sdk

安装 Google Play 服务,但我找不到任何可以提供帮助的东西。我的 Android Studio 版本是 2.2.2。 我下载了 GooglePlayServices apk 文件(com.google.android.gms-9.8.77-440-135396225-APK4Fun.com),我将它拖放到模拟器中进行安装,但它有错误 错误:安装失败不兼容

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9877000 but found 9683470

我需要你的帮助。

【问题讨论】:

标签: google-play-services


【解决方案1】:

经过 3 天的搜索。我发现这次地图无法在模拟器上显示。我们所要做的就是在物理设备上运行应用程序,它就会工作。

【讨论】:

    【解决方案2】:

    您需要在build.gradle 上更改以下内容:

    compile 'com.google.android.gms:play-services:9.0.2'

    【讨论】:

      【解决方案3】:

      首先,尝试检查您的 SDK 管理器是否更新了 Google Play 服务。另外,请尝试打开独立的 SDK 管理器并更新 Android SDK 工具、Android SDK 平台工具和 Android SDK 构建工具。

      要在模拟器本身中更新 Google Play 服务,请查看此SO question。它将向您解释如何执行此操作。

      如果您使用play-services:9.8.0,此问题的另一个可能原因在此thread 中。此处说明更新的 Android 工具(包含 Android Emulator 系统映像)尚未发布。所以在此期间,尽量使用降级版本的play、service,而不是9.8.0。

      有关更多信息,请查看此documentation,了解如何设置 Google Play 服务

      【讨论】:

      • 感谢您的帮助。我更新了所有内容,但它仍然无法在模拟器上运行。不过,我可以在我的实体手机上运行它。
      【解决方案4】:

      在 Android SDK Manager 中,您必须在“Android 4.4.2 (API 19)”下安装“Google APIs (x86 System Image)”。退出 Eclipse 并重新启动它。

      然后在 AVD 管理器中创建一个新的 android 虚拟设备并选择“Google APIs x86 (Google Inc.) - API Level 19”作为目标。勾选“Use Host GPU”,保证地图绘制会加速。

      就是这样,这个新的模拟器将预装 Play Services,运行速度会更快,因为它是 x86 映像。

      【讨论】:

        【解决方案5】:

        是的,谢谢你们。我现在可以让它在模拟器上运行。我用

        compile 'com.google.android.gms:play-services-maps:9.6.0'
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2023-03-29
          • 2017-03-11
          • 1970-01-01
          • 2017-02-28
          • 2015-08-22
          • 1970-01-01
          相关资源
          最近更新 更多