[英]java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging using java.lang.NoClassDefFoundError:
This is really annoying. 真烦人。 I've wasted a whole day but haven't received any proper result. 我浪费了一整天,但没有收到任何适当的结果。 I'm trying to add Google Cloud Messages into my app. 我正在尝试将Google Cloud Messages添加到我的应用中。 I'm using Eclipse last version. 我正在使用Eclipse的最新版本。 ADT last version. ADT的最新版本。 I've added google-play-services_lib as Library, added the jar file in Build path but my app drops at the code line below: 我已将google-play-services_lib添加为库,在构建路径中添加了jar文件,但我的应用程序位于以下代码行:
GoogleCloudMessaging regId = GoogleCloudMessaging.getInstance(_.appContext);
java.lang.NoClassDefFoundError!
How to solve this problem? 如何解决这个问题呢?
The problem is the bug of SDK and Eclipse. 问题是SDK和Eclipse的错误。 The library google-play-service.jar didn't attached in a proper way. google-play-service.jar库未正确连接。 Just full reinstalling Eclipse (with ADT) and SDK helped to me. 只是完全重新安装了Eclipse(使用ADT)和SDK对我有所帮助。 The connected question about all classes (not only Cloud Messages) is here . 有关所有类(不仅是Cloud Messages)的相关问题在这里 。 Do not forget about memory increasing in eclipse.ini file. 别忘了eclipse.ini文件中的内存增加 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.