Using lambdaj in android
Asked Answered
B

2

12

Does anyone tried to use lambdaj library in android development?

It works fine for me when I create a simple small java application, but I can't manage to use it in an android application.

UPDATE:

I'm adding lambdaj (lambdaj-2.3.2-with-dependencies.jar, downloaded from http://code.google.com/p/lambdaj), and then when building my application get the following error:

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
Brownie answered 12/5, 2011 at 11:11 Comment(4)
Can you elaborate more what you have tried so far?Erne
Can you clarify further what doesn't work? Eg, have you followed the steps at: developer.android.com/resources/faq/… ? Do you get a compiler error, or a runtime error, and in which case what is it?Autocade
as error message is to long, updated postBrownie
sorry, didn't have much time for this, so went to good old loopingBrownie
H
1

I know that this question is 4 years old, but I had the same problem nowdays and I solved by adding to my gradle build configuration depedencies the last hamcrest library version available.

here my related thread


UPDATE:

I had some problem with lambdaj on my project, this library is not totally compatible. I moved to retrolambda, check it out!

Hildebrandt answered 27/10, 2015 at 11:26 Comment(0)
P
1

It looks to me like there is a problem with the hamcrest library. Try following the advice in the error and rebuild the hamcrest library from source.

Prejudge answered 23/5, 2011 at 11:46 Comment(0)
H
1

I know that this question is 4 years old, but I had the same problem nowdays and I solved by adding to my gradle build configuration depedencies the last hamcrest library version available.

here my related thread


UPDATE:

I had some problem with lambdaj on my project, this library is not totally compatible. I moved to retrolambda, check it out!

Hildebrandt answered 27/10, 2015 at 11:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.