Android 2.3.3及更高版本支持Google Play服务。
您看到的输出是告诉您您的应用程序需要Google Play Services v6.1.71。你可能有这样的在你的build.gradle文件:
compile 'com.google.android.gms:play-services:6.1.71' // or 6.1.+
输出的第二部分“但发现5053030”是指您的设备的谷歌Play服务的应用程序,它比什么是需要你的应用程序的低。 Google Play服务应用最终会在您的设备上自动更新。
您可以在您的应用程序中使用此代码段,该代码段将显示一个对话框,允许用户尝试更新其设备上安装的Google Play服务应用程序的版本。
/**
* Check the device to make sure it has the Google Play Services APK. If
* it doesn't, display a dialog that allows users to download the APK from
* the Google Play Store or enable it in the device's system settings.
*/
public static boolean checkGooglePlayServices(Activity activity) {
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity);
if (resultCode != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000).show();
}
return false;
}
return true;
}
你想支持哪个版本的android? – tyczj 2014-11-06 21:03:02