I know you guys are more IntelliJ fans (I'm more NetBeans ;)) but I
need to know how to setup robolectric on Eclipse. I can already
execute tests via right click->run configuration->maven test
But when I run as android application then eclipse throws a lot of
warnings [1] at me and then gets slightly slower and slower and
finally crashes. I could track it down that if I exclude the single
robolectric dependency from the pom (but still leave the maven
dependencies in the project) I can run it. What could be the reason?
Can it be a problem that I'm using the "older" android sdk 2.2.1 aka
"2.2_r3"? Or is it due to the fact that I'm using javac 1.6 specified
in the pom.xml?
I already tried to build robolectric myself but failed due to some
android classes missing [2] - which sounds logically to me since
android is only "provided" (?)
This is the same bug someone else already encountered but the provided
solutions don't work for me:
http://stackoverflow.com/q/5591811/194609
Regards,
Peter.
[1]
[2012-01-31 23:27:08 - Project] Dx warning: Ignoring InnerClasses
attribute for an anonymous inner class (org.ibex.nestedvm.Runtime$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.
[2012-01-31 23:27:08 - Project] Dx warning: Ignoring InnerClasses
attribute for an anonymous inner class (org.ibex.nestedvm.Runtime
$TerminalFD$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.
[2012-01-31 23:27:08 - Project] Dx warning: Ignoring InnerClasses
attribute for an anonymous inner class (org.ibex.nestedvm.UnixRuntime
$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.
[2012-01-31 23:27:08 - Project] Dx warning: Ignoring InnerClasses
attribute for an anonymous inner class (org.ibex.nestedvm.UnixRuntime
$DevFS$1$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.
[2]
....
TestWindow.java:[8,19] cannot find symbol
[ERROR] symbol : class InputQueue
[ERROR] location: package android.view
[ERROR] ../android/robolectric/src/main/java/com/xtremelabs/
robolectric/shadows/ShadowCamera.java:[28,38] cannot find symbol
[ERROR] symbol : class CameraInfo
[ERROR] location: class android.hardware.Camera
...