java.lang.NoClassDefFoundError:com.google.android.gms.gcm.GoogleCloudMessaging在ADT更新后 [英] java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging after ADT update

查看:241
本文介绍了java.lang.NoClassDefFoundError:com.google.android.gms.gcm.GoogleCloudMessaging在ADT更新后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:


07-16 13: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后上个星期。代码:

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私人库导出已选中:

< img src =https://i.stack.imgur.com/L1Ubj.pngalt =enter image description here>

我也尝试只包括在libs /文件夹中的google-play-services.jar,我收到相同的错误。

推荐答案

这是问题:

Android - 找不到google-play-services_lib.apk!错误

我从java构建路径中删除了谷歌播放服务 - >项目,它的工作!

I removed google-play-services from java build path->Projects and it worked!

这篇关于java.lang.NoClassDefFoundError:com.google.android.gms.gcm.GoogleCloudMessaging在ADT更新后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆