【问题标题】:Android app requires Google Play Service Update - Open button instead of UpdateAndroid 应用需要 Google Play 服务更新 - 打开按钮而不是更新
【发布时间】:2023-03-28 14:58:01
【问题描述】:

为了使用 GCM(Google Cloud Messaging),我需要在我的应用程序中实现 Google Play 服务库。在我的 Galaxy S2 (Android 4.1.2) 上一切正常,但在我的 HTC (Android 2.2.2) 上我无法更新 Google Play 服务。

在创建应用程序时(onCreate),我检查是否已安装 Google Play 服务或是否需要更新:

public static boolean isGooglePlayServiceEnabled(Context context)
{
    return GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS ? true : false;
}

在我的活动中:

onCreate(Bundle savedInstance)
{
    // Some code....
    if (!isGooglePlayInstalled(this))
    {
        int errorCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(instance)
        if (errorCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED)
        {
            // Alert Dialog and prompt user to update App
            startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.google.android.gms")));
        }
    }
}

用户被重定向到市场以更新 Google Play 服务。但是当他到达时,没有“更新”按钮!它只有两个按钮:“打开”和“卸载”!

我该怎么办?

更新

我刚刚发现 Google 放弃了对 Android

现在超过 97% 的设备运行 Android 2.3 (Gingerbread) 或 较新的平台版本,我们从此不再支持 Froyo 发布 Google Play 服务 SDK 以使其成为可能 未来提供更强大的 API。这意味着你不会 能够在运行 Android 2.2 (Froyo) 的设备上使用这些新 API。

【问题讨论】:

  • 有适用于 froyo 的 Google Play 服务。如果您使用“Froyo 的 Google Play 服务”,您将无法使用 Google Play 服务 4.0 中包含的新功能。对于地图,4.0 的功能包括

标签: android


【解决方案1】:

您的设备没有当前版本的 Google Play 服务。如果没有可用的更新,PlayStore 只会让您打开应用程序。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多