Android 添加Google应用内计费会导致应用找不到Google Play服务
我的应用程序使用Android 添加Google应用内计费会导致应用找不到Google Play服务,android,google-play-services,in-app-billing,google-cloud-messaging,Android,Google Play Services,In App Billing,Google Cloud Messaging,我的应用程序使用Google云消息,并使用安卓网站上的实现代码,检查是否安装了Google Play Services APK: // Check for Google Play Services APK. If success, proceed with GCM registration. public void registerGcm() { if (checkPlayServices()) { mGcm = GoogleCloudMessaging.getInsta
Google云消息
,并使用安卓网站上的实现代码,检查是否安装了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谷歌应用内计费
,它就停止工作了,checkPlayServices()
开始返回false
为什么会这样?还有其他人经历过类似的问题吗?此错误发生在我升级Google Play服务后
我也在日志中看到了这条信息:
08-19 13:12:39.730: W/GooglePlayServicesUtil(11708): Google Play services out of date. Requires 5089000 but found 5084036
以下几个链接可能有助于您理解和解决问题: