Google Play Services版本5.2.08对我的设备来说太近了

19 android google-play-services

我使用这种方法来检查播放服务的可用性:

private boolean checkPlayServices() {
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (status != ConnectionResult.SUCCESS) {
        if (GooglePlayServicesUtil.isUserRecoverableError(status)) {
            showErrorDialog(status);
        } else {
            Toast.makeText(this, "This device is not supported.", Toast.LENGTH_LONG).show();
            finish();
        }
        return false;
    }
    return true;
}
Run Code Online (Sandbox Code Playgroud)

status 现在,当我运行应用程序时,它被设置为2,表明已安装的游戏服务需要更新,即使游戏商店没有为游戏服务存储更新.

isUserRecoverableError调用对话框说:

更新Google Play服务 - 除非您更新Google Play服务,否则此应用无法运行

这是在我通过SDK管理器更新我的Android SDK之后发生的,该管理器更新了"Google Repository"(如果我没记错的话,"谷歌播放服务",尽管昨天更新了没有任何问题).

Android Studio告诉我播放服务版本是5.2.08.

我能做什么?例如,我可以在依赖项部分强制使用较低版本吗?

compile 'com.google.android.gms:play-services:+'
Run Code Online (Sandbox Code Playgroud)

nha*_*man 24

最初发布在这个问题上


我指定了我记得看到的以前的版本app/build.gradle,我的应用程序运行正常:

compile 'com.google.android.gms:play-services:5.0.89' 
Run Code Online (Sandbox Code Playgroud)