【问题标题】:Adding Google In-App Billing causes app to not find Google Play Services添加 Google In-App Billing 会导致应用找不到 Google Play 服务
【发布时间】:2014-08-19 20:09:30
【问题描述】:

我的应用使用Google Cloud Messaging并使用Android网站上的实现代码,它检查Google Play Services APK是否安装:

// Check for Google Play Services APK. If success, proceed with GCM registration.
public void registerGcm() {
    if (checkPlayServices()) {
        mGcm = GoogleCloudMessaging.getInstance(mContext);
        mGcmRegId = getRegistrationId(mContext);

        if (mGcmRegId.isEmpty()) { new RegisterGCMTask().execute(); }
    }
    else {
        Toast.makeText(mContext, "Google Play Services APK not found\n"
                + "Please download Google Play Services", Toast.LENGTH_LONG).show();
        mActivity.finish();
    }
}

一切正常,checkPlayServices() 之前返回 true。但是,一旦我将v3 Google In-App Billing 实现为指令here,它就停止工作并且checkPlayServices() 开始返回false。

为什么会这样?还有其他人遇到过类似的问题吗?我升级 Google Play 服务后出现此错误。

我的 Logcat 中也有这个注释:

08-19 13:12:39.730: W/GooglePlayServicesUtil(11708): Google Play services out of date.  Requires 5089000 but found 5084036

【问题讨论】:

    标签: android google-play-services in-app-billing google-cloud-messaging


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2019-10-22
    • 2013-04-10
    • 2014-11-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 2016-02-20
    • 1970-01-01
    相关资源
    最近更新 更多