java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging using java.lang.NoClassDefFoundError:

拥有回忆 提交于 2020-01-06 16:11:43

问题


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. I'm using Eclipse last version. ADT last version. 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:

GoogleCloudMessaging regId = GoogleCloudMessaging.getInstance(_.appContext);

java.lang.NoClassDefFoundError!

How to solve this problem?


回答1:


The problem is the bug of SDK and Eclipse. The library google-play-service.jar didn't attached in a proper way. Just full reinstalling Eclipse (with ADT) and SDK helped to me. The connected question about all classes (not only Cloud Messages) is here. Do not forget about memory increasing in eclipse.ini file.



来源:https://stackoverflow.com/questions/29898396/java-lang-noclassdeffounderror-com-google-android-gms-gcm-googlecloudmessaging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!