在日食时java.lang.NoClassDefFoundError的图书馆crouton [英] java.lang.NoClassDefFoundError when crouton library in eclipse

查看:174
本文介绍了在日食时java.lang.NoClassDefFoundError的图书馆crouton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我终于能找到我crouton库,获取解决方案<一后href=\"http://stackoverflow.com/questions/21158476/i-cant-access-crouton-library-in-eclipse/21159348?noredirect=1#comment31850295_21159348\">this在SO问题。
我是导演到Maven中央在那里我在页面底部下载crouton-1.8.4大小24KB的第三名单。然后我就复制到libs文件夹在我的Andr​​oid项目,添加它来构建路径,并在订货和出口面板中勾选了。

I was finally able to find my crouton library, after getting solutions for this question on SO. I was directed to maven central where i downloaded crouton-1.8.4 the third of size 24kb on a list at the bottom of the page. Then i copied it into the libs folder in my android project, added it to build path, and checked it in the order and export panel.

这解决了我面临再在这个问题我问过的问题。

This solved the problem i was facing then in the question i asked before.

在code我试图运行是 Crouton.makeText(这一点,BAD Crouton,Style.ALERT);
只是为了看看它是否工作。我我在一个模拟器4.4.2测试它。我也试过在2.2模拟器,加入Style.Builder,它需要去努力降低设备之后。我得到了同样的问题。

The code i tried to run was Crouton.makeText(this, "BAD Crouton", Style.ALERT); just to see if it works. I i'm testing it on a 4.4.2 emulator. And i also tried it on a 2.2 emulator, after adding the Style.Builder, which it requires to work on lower devices. i get the same problem.

但是,当我的快乐是短暂的,因为当我测试了它在模拟器上,这里是我在logcat中得到了错误。

But when my joy was short-lived, because when i tested it on the emulator, here is the error i got in my logcat.

 01-17 03:15:44.537: E/AndroidRuntime(2203): FATAL EXCEPTION: main
 01-17 03:15:44.537: E/AndroidRuntime(2203): Process: com.example.dester, PID: 2203
 01-17 03:15:44.537: E/AndroidRuntime(2203): java.lang.NoClassDefFoundError: de.keyboardsurfer.android.widget.crouton.Style
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at com.example.dester.MainActivity.onCreate(MainActivity.java:17)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.Activity.performCreate(Activity.java:5231)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.os.Handler.dispatchMessage(Handler.java:102)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.os.Looper.loop(Looper.java:136)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at android.app.ActivityThread.main(ActivityThread.java:5017)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at java.lang.reflect.Method.invokeNative(Native Method)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at java.lang.reflect.Method.invoke(Method.java:515)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
 01-17 03:15:44.537: E/AndroidRuntime(2203):    at dalvik.system.NativeStart.main(Native Method)

当我第一次我想这一定是一些简单的错误,所以我清洗和再次重修,并仍然得到了同样的错误。然后我搜索信息的 java.lang.NoClassDefFoundError的,我发现它有一些东西需要与VM没有被找到,它被要求加载类。在这种情况下,这将是样式类。

When i first got the error i thought it must be something simple, so i cleaned and rebuilt it again and still got the same error. Then i searched for info on java.lang.NoClassDefFoundError and i found out that it had something to do with VM not being to locate a class that it was asked to load. In this case that would be the Style class.

我已经花了几乎24小时就这个问题和尝试了很多的解决方案,也都无济于事。

I have spent almost 24 hours on this and have tried lots of solutions, all too no avail.

只是柜面,我的Java编译器合规性水平为1.6和我使用JRE6
谢谢

Just incase, my java compiler compliance level is 1.6 and i using JRE6 Thanks

推荐答案

Crouton 1.8.3已经发布,回滚到Java 6源代码的兼容性。
使用这个版本应该解决的问题。

Crouton 1.8.3 has been released and rolled back to Java 6 source compatibility. Using this version should solve the issue.

这篇关于在日食时java.lang.NoClassDefFoundError的图书馆crouton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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