【发布时间】: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