简体   繁体   English

java.lang.NoClassDefFoundError:GCMIntentService

[英]java.lang.NoClassDefFoundError: GCMIntentService

My app used to work perfectly fine. 我的应用程序过去可以正常运行。 Recently I updated eclipse (the plugins), and now I am getting this error. 最近,我更新了eclipse(插件),现在却遇到此错误。 I have not changed my code so I know it should continue to work. 我没有更改代码,所以我知道它应该继续工作。 but it does not. 但事实并非如此。 I am using the google eclipse plugin, which the updates changed to version 8. 我正在使用google eclipse插件,其更新已更改为版本8。

Basically I still see everything in the android project. 基本上我仍然可以在android项目中看到所有内容。 the gcm.jar is still there for example. 例如, gcm.jar仍然存在。 And my manifest has not change. 而且我的清单没有改变。 I can keep listing stuff but it would just be more words. 我可以继续列出东西,但这只是更多的话。 Bottom line: It used to work fine. 底线:以前工作正常。

在新的adt工具中,您需要在项目的Java Build Path中的Android Private Libraries复选框中打勾。

Just adding to @athor's answer, as you said that you updated everything. 正如您所说的,您更新了所有内容,仅添加了@athor的答案。 Its a high possibility that you updated android SDK-tools to latest version 22. This is a known issue and this has been discussed many times. 您极有可能将android SDK工具更新到最新版本22。这是一个已知问题,已经讨论了很多次。 You might want to check out following threads and picture . 您可能想查看以下线程和图片

Android app crashes after SDK-tools update version (NoClassDefFound, tool version 22) SDK工具更新版本(NoClassDefFound,工具版本22)后,Android应用程序崩溃

ERROR : java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager 错误:java.lang.NoClassDefFoundError:android.support.v4.content.LocalBroadcastManager

The picture and thread will help to find the exact location where to make changes. 图片和线程将有助于找到进行更改的确切位置。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM