【发布时间】:2014-09-22 22:51:43
【问题描述】:
我正在使用 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 没有附带 google play 服务(为什么?我不知道,但它有 gmail,并且地图工作正常),当我运行应用程序时,验证工作并且带我去 Play 商店安装/更新 Google Play 服务,但是页面显示:您的设备与此版本不兼容。
如果 Google Play 服务在 Play 商店中不可用,我该如何安装它? 没有这个应用程序的安卓设备很常见吗?
谢谢,
【问题讨论】:
标签: android google-maps google-play-services