【问题标题】:How to install Google Play Service 7.3.0 or above in Android Emulator?如何在 Android Emulator 中安装 Google Play Service 7.3.0 或更高版本?
【发布时间】:2015-05-12 05:45:12
【问题描述】:

我正在为我的应用集成 Google Plus 登录。唯一的事情是我在 Android SDK 中更新了所有内容,但是当我在 Android Emulator 中运行我的应用程序时,我在 Android Studio 中收到错误消息 “Google Play 服务已过期。需要 7327000 但找到 6774480”。 Android Studio 不允许我使用旧版本的 Play Services。

我搜索了不同的方法来离线安装​​最新的 Google Play 服务 (.apk),但在使用“adb install gps.apk”运行时会出现不兼容错误。

即使是最新的 Android 操作系统映像也安装了旧版本的 Google Play 服务,而 Android SDK 中甚至没有针对这些服务的更新指示器,情况如何?

【问题讨论】:

    标签: android android-studio google-play-services


    【解决方案1】:

    使用APK MIRROR,它包含所有版本的Google Play Services。

    附:请记住在安装新版本之前从设备上卸载已安装的 Google PlayService 版本。

    【讨论】:

    • 我这样做了,但执行此命令时出现以下错误:adb uninstall com.google.android.gms-6.7.74 Failure [DELETE_FAILED_INTERNAL_ERROR]
    • 尝试使用adb install -r yourapp.apk安装
    • 试过了。它说失败 [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
    • >adb install -r "com.google.android.gms-7.3.29_(186 6531-470)-7329470-minAPI21.apk" 但仍然 [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
    【解决方案2】:

    感谢 Murtaza 对此做出贡献,但我在这一切之间找到了解决方案。我在已安装 Google Play 服务的模拟器中使用 Google API 映像。 所以我们有 2 个卸载/重新安装它们的选项,其中 NONE 有效。

    我所做的是从您给定的链接下载 APK 并将其安装在 Emulator without Google API image 上。它在那里成功安装,我在模拟器上安装了更新的 Google Play 服务。

    【讨论】:

    • 我还能够从 apkmirror 将 apk 安装到香草模拟器图像上,但实际上尝试运行使用 google play 服务的应用程序会导致两者都崩溃。 Logcat 显示此错误:“java.lang.SecurityException:尝试未经许可读取 gservices:用户 10053 和当前进程都没有 com.google.android.providers.gsf.permission.READ_GSERVICES。”将 apk 安装为系统应用程序的各种方法也不适合我。
    猜你喜欢
    • 1970-01-01
    • 2023-03-29
    • 2012-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-19
    • 1970-01-01
    • 2015-08-22
    相关资源
    最近更新 更多