gpt4 book ai didi

java - isGooglePlayServicesAvailable 返回 9

转载 作者:行者123 更新时间:2023-11-29 07:54:07 28 4
gpt4 key购买 nike

我的应用程序中有以下代码来启动 map View

private boolean servicesOk() {
int isAvailable = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(this);
if (isAvailable == ConnectionResult.SUCCESS) {
return true;
} else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable)) {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable,
this, GPS_ERRORDIALOG_REQUEST);
dialog.show();
} else {
Toast.makeText(this, "Connect Connect to Maps", Toast.LENGTH_SHORT)
.show();

}
return false;
}

但是在检查时 isAvailable 的值为 9,而且在 LogCat 中不断重复消息:Google Play 服务是无效的。无法恢复。

谁能告诉我,我犯了什么错误?

最佳答案

来自 the documentation 9 是 google play 服务的无效/不真实安装。

您确定从 Play 商店下载并更新了 GPS 吗?

关于java - isGooglePlayServicesAvailable 返回 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19083447/

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