首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在android中使用lambdaj

在android中使用lambdaj
EN

Stack Overflow用户
提问于 2011-05-12 19:11:18
回答 2查看 2.4K关注 0票数 12

有没有人尝试过在android开发中使用lambdaj库?

当我创建一个简单的小java应用程序时,它对我来说工作得很好,但我不能在android应用程序中使用它。

更新:

我添加了lambdaj (lambdaj-2.3.2-with-dependencies.jar,从http://code.google.com/p/lambdaj下载),然后在构建我的应用程序时得到以下错误:

代码语言:javascript
复制
Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.hamcrest.generator.qdox.directorywalker.DirectoryScanner$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

[2011-05-12 15:45:30 - MyAppName] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.hamcrest.generator.qdox.JavaDocBuilder$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

[2011-05-12 15:45:30 - MyAppName] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.hamcrest.generator.qdox.junit.APITestCase$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

[2011-05-12 15:45:30 - MyAppName] Dx 
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information.

...
skipped stack trace
...

...while working on block 001b

...while working on method yylex:()I

...while processing yylex ()I

...while processing org/hamcrest/generator/qdox/parser/impl/JFlexLexer.class

[2011-05-12 15:45:30 - MyAppName] Dx 1 error; aborting

[2011-05-12 15:45:30 - MyAppName] Conversion to Dalvik format failed with error 1
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-10-27 19:26:59

我知道这个问题已经有4年的历史了,但我现在也遇到了同样的问题,我通过在gradle build配置中添加了最新的hamcrest库版本来解决这个问题。

here my related thread

更新:

我在我的项目中遇到了一些关于lambdaj的问题,这个库并不完全兼容。我搬到retrolambda了,看看吧!

票数 1
EN

Stack Overflow用户

发布于 2011-05-23 19:46:45

在我看来,汉克雷斯特图书馆出了点问题。尝试遵循错误中的建议,并从源重新构建hamcrest库。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5977100

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档