我正在使用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和Maps运行正常)。当我运行应用程序时,验证程序可以正常工作并带我进入Play商店来安装/更新谷歌应用服务,但是页面会显示:“您的设备与此版本不兼容”。
那么如果在Play商店中无法找到谷歌应用服务,该怎么办呢?Android设备没有此应用程序是普遍现象吗?
谢谢。
如图:
![enter image description here](https://istack.dev59.com/1Lgm0.webp)