gpt4 book ai didi

android - 与 Android 4.0.4 不兼容的 Google Play 服务

转载 作者:太空狗 更新时间:2023-10-29 14:12:25 33 4
gpt4 key购买 nike

我正在使用 google map v2 构建一个应用程序,它需要 google play 服务,所以我添加了这个验证来检查它:

        int checkGooglePlayServices = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(myContext);
if (checkGooglePlayServices != ConnectionResult.SUCCESS) {
// google play services is missing!!!!
/*
* Returns status code indicating whether there was an error.
* Can be one of following in ConnectionResult: SUCCESS,
* SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED,
* SERVICE_DISABLED, SERVICE_INVALID.
*/
GooglePlayServicesUtil.getErrorDialog(checkGooglePlayServices,
myContext, REQUEST_CODE_RECOVER_PLAY_SERVICES).show();
}

所以事实证明我有一个设备 4.0.4 没有附带谷歌播放服务(为什么?我不知道,但它有 gmail, map 工作正常),当我运行应用程序时,验证有效并且带我去 Play 商店安装/更新 Google Play 服务,但是页面显示:您的设备与此版本不兼容。

如果 Google Play 服务在 Play 商店中不可用,我该如何安装它?没有此应用程序的 Android 设备很常见吗?

谢谢,

enter image description here

最佳答案

  • 该错误似乎表明您设备上的播放服务版本与您的应用使用的播放服务库不兼容。哪里说播放服务在您的设备上不可用。

    要确保播放服务在您的设备上运行,并找出其版本,请查看设置 -> 应用程序 -> 下载 -> Google Play 服务

Finding Google Play Services version

  • 由于它没有为您提供更新设备上的播放服务的选项,我会考虑在您的应用中使用匹配的播放服务客户端库。您可以像这样在应用程序模块的 Android Studio build.gradle 上轻松地执行此操作,方法是向您的依赖项添加确切的版本

    依赖关系{
    编译 'com.google.android.gms:play-services:5.0.89'
    }

    5.0.89 替换为您在设备上找到的版本。

关于android - 与 Android 4.0.4 不兼容的 Google Play 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25984266/

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