Lambdaj的NoClassDefFoundError在Android [英] Lambdaj NoClassDefFoundError on android

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

问题描述

我尝试lambdaj在我的Andr​​oid应用程序,但即使最简单的过滤操作失败,列出的除外。例如:

 集团<&人GT; groupedPersons =组(人,由(上(Person.class).getAge()));

和任何其他选择或过滤器结束使用相同的以下异常,任何想法? 人类是一类greenDAO如果它可能与.....谢谢

  16 04-05:07:48.735:E / AndroidRuntime(6579):致命异常:主要
04-05 16:07:48.735:E / AndroidRuntime(6579):java.lang.NoClassDefFoundError的:ch.lambdaj.function.argument.ProxyArgument
04-05 16:07:48.735:E / AndroidRuntime(6579):在ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:68)
04-05 16:07:48.735:E / AndroidRuntime(6579):在ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:58)
04-05 16:07:48.735:E / AndroidRuntime(6579):在ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:50)
04-05 16:07:48.735:E / AndroidRuntime(6579):在ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39)
04-05 16:07:48.735:E / AndroidRuntime(6579):在ch.lambdaj.Lambda.on(Lambda.java:63)


解决方案

这异常是因为库不包含在生成的Andr​​oid应用程序(.apk文件)。

要解决这个问题,没有什么做你code是怎么写的,而是关于你的项目设置。


  • 如果你包括它作为一个.jar文件,确保该文件是在libs文件夹。

  • 如果你包括它作为整个项目,确保包括在出口在项目属性的Java构建路径项目。

I'm trying out lambdaj in my android app but even the simplest filtering operations fail with the exception listed. For example:

Group<Person> groupedPersons= group(people,by(on(Person.class).getAge()));

and any other select or filter ends up with the same following exception, any idea? The "Person" class is a greenDAO class if it could be related..... thanks

04-05 16:07:48.735: E/AndroidRuntime(6579): FATAL EXCEPTION: main
04-05 16:07:48.735: E/AndroidRuntime(6579): java.lang.NoClassDefFoundError:ch.lambdaj.function.argument.ProxyArgument
04-05 16:07:48.735: E/AndroidRuntime(6579):     at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:68)
04-05 16:07:48.735: E/AndroidRuntime(6579):     at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:58)
04-05 16:07:48.735: E/AndroidRuntime(6579):     at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:50)
04-05 16:07:48.735: E/AndroidRuntime(6579):     at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39)
04-05 16:07:48.735: E/AndroidRuntime(6579):     at ch.lambdaj.Lambda.on(Lambda.java:63)

解决方案

This exception is because the library was not included the generated android app (.apk file).

To fix it, there's nothing to do on how your code is written, but about your project settings.

  • If you're including it as a .jar file, make sure that the file is in the libs folder.
  • If you're including it as the whole project, make sure to include the project in the Export in the Java Build path in the Project Properties.

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

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