문제

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top