本文介绍了Android的java.lang.NoClassDefFoundError的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse IDE中的Andr​​oid项目正在工作。部分进口和测试后,我得到的错误: java.lang.NoClassDefFoundError的

I have an Android project in eclipse IDE which was working. After some imports and tests, I get the error: java.lang.NoClassDefFoundError.

在我的项目,我有两个包:主要的一个,第二个用一些类

In my project I have two packages: the main one and the second one with some classes.

当我尝试实例从第二包装类对象的主要活动课,我收到此错误。

When I try to instantiate an object from the second package class in the main activity class, I am getting this error.

下面是logcat的:

Here is the logcat:

FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.neurospeech.wsclient.MDPIforEditorialBoard
at milos.mdpi.Journals.<init>(Journals.java:41)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1409)
at android.app.Instrumentation.newActivity(Instrumentation.java:1040)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1777)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4389)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)

找到了解决我的问题:

该解决方案可以在这里找到:http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

The solution can be found here: http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

推荐答案

你最近更新你的Eclipse Android插件(ADT R17)?那么下面的链接可以帮助:

Did you recently updated your eclipse android plugin (adt r17)? Then the following link might help:

如何修复与ADT-17 的classdefnotfounderror

How to fix the classdefnotfounderror with adt-17

更新:一年过去了,因为由此产生的问题。我将保持联系,因为即使在2013年似乎帮助一些人解决问题。但请小心你在做什么,见下文埃里克斯评论。目前ADT-版本是22,我建议使用最新版本。

Update: One year has passed since the question arose. I will keep the link, because even in 2013 it seem to help some people to solve the problem. But please take care what you are doing, see Erics comment below.Current ADT-Version is 22, I recommend using the most current version.

这篇关于Android的java.lang.NoClassDefFoundError的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 07:50