java.lang.NoClassDefFoundError的:ADT更新后com.google.android.gms.gcm.GoogleCloudMessaging [英] java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging after ADT update
问题描述
我得到这个错误:
13 07-16:56:12.341:E / AndroidRuntime(23287):
java.lang.NoClassDefFoundError的:
com.google.android.gms.gcm.GoogleCloudMessaging
07-16 13:56:12.341: E/AndroidRuntime(23287): java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging
我在上周更新后ADT。在code:
after I updated ADT last week. The code:
public GCMRegisterTask(Context acontext) {
this.context = acontext;
if (gcm == null) {
gcm = GoogleCloudMessaging.getInstance(context);
}
}
该项目不显示任何编译错误,但是当我尝试在我的手机来调试这个(Android的4.2,我也试着在一个表中与Android 4.4)出现此错误。我已经尝试了所有的解决方法:
The project doesn't show any compilation error, but when I try to debug this in my phone(Android 4.2, I've also tried in one table with Android 4.4) this error occurs. I've tried all the workarounds:
Android的私家藏书出口检查:
我也试过,包括只有在库/文件夹谷歌播放-services.jar和我得到了同样的错误。
推荐答案
这就是问题所在:
<一个href=\"http://stackoverflow.com/questions/16756561/android-could-not-find-google-play-services-lib-apk-error\">Android - 无法找到谷歌播放,services_lib.apk!错误
我删除了Java构建path->项目谷歌播放服务,它的工作!
I removed google-play-services from java build path->Projects and it worked!
这篇关于java.lang.NoClassDefFoundError的:ADT更新后com.google.android.gms.gcm.GoogleCloudMessaging的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!