I'm trying do build and debug a small project for BlackBerry.
During the build I'm getting this error Error preverifying class java ...
I read on the net this error could be caused by referencing multiple projects but I tried to move every package in a single project but the error is still there.
I tried with multiple JDE version (currently 4.7) and the Java compiler is set to 1.6. Eclipse version is 3.4.1 as recommended by RIM's documentations.
Edit for clarification
To clarify: I'm not referencing exterlan JARs, only "my" Classes.
The Error preverifying class is thrown on a very simp开发者_开发百科le class (4 private field with getters/setters, implementing serializable, that's all!). What's weird is that I got the error only on this class. I have others classes like this, but these are ok.
I changed the compliance level to 1.4 but the error persists...
Does someone have some clue?
I got what's wrong!
First of all, I was trying to port an Android project to BlackBerry, and since you program both device in Java I thought: ok, just go ahead and implement the device specific classes... But that's not completely true! So to make it compile I included in the BlackBerry project the JRE System Library, thinking it was just "right". But...
BlackBerry does not use Java SE as Android does. They implemented their own libraries.* (as pointed out here Blackberry JDE ArrayList?)
So the error "Error preverifying class java" was actually caused by a external JAR, and this JAR was the JRE System library...
To fix this, I removed JRE and replaced all the standard classes (like ArrayLists etc) with RIM's implementation :(
精彩评论