我试图用lambdaj在Android上,但与每一个简单的调用我让我得到一个异常(java.lang.ExceptionInInitializerError)。
I'm trying to use lambdaj on Android but with every simple call I make I get an exception (java.lang.ExceptionInInitializerError).
这填补了集合类是:
@DatabaseTable(tableName = "sections")
public class Section {
@DatabaseField(id = true, unique = true)
private int id;
@DatabaseField(canBeNull = false)
private String name;
public Section() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
注释所使用的ORMLite。我离开他们在情况下,他们可能会以某种方式有关。我虽然怀疑这一点。
The annotations are used by ORMLite. I left them in case they could be relevant somehow. I doubt it though.
现在,如果我尝试做一个简单的通话一样,它崩溃了:
And now if I try to make a simple call like, it crashes:
List<Section> sections = fillSections(); //this is correctly filled
select(sections, having(on(Section.class).getId(), Matchers.greaterThan(1)))
logcat的:
Logcat:
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ch.lambdaj.proxy.ProxyUtil.createEnhancer(ProxyUtil.java:89)
at ch.lambdaj.proxy.ProxyUtil.createProxy(ProxyUtil.java:49)
at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:68)
at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:58)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:50)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39)
at ch.lambdaj.Lambda.on(Lambda.java:63)
什么困扰我的是,我尝试了同样的code在Java控制台应用程序和它的工作...
What puzzles me is that I tried the very same code in a java console application and it worked...
任何想法,为什么这不会在Android上工作?
Any idea why this wouldn't work on Android?
感谢。
推荐答案
显然,lambdaj不会对Android的每个创作者的话工作。 https://groups.google.com/d/msg/lambdaj/km7uFgvSd3k/grJhgl3ik5sJ
Apparently, lambdaj won't work on Android per the creator's words. https://groups.google.com/d/msg/lambdaj/km7uFgvSd3k/grJhgl3ik5sJ
读书,我不再试图使它发挥自己后。
After reading that I stopped trying to make it work myself.
相关推荐
最新文章