I found the solution. I downloaded the wrong Robolectric jar file. You have to use the jar-with-dependencies.jar
found here. Then everything went well.
Robolectric Initialization Error in Eclipse
-
16-07-2023 - |
Question
I'm currently following this tutorial on using Robolectric for Eclipse. And I can't seem to make it work. It keeps throwing initializationError
and in the Failure Trace it has a java.lang.noClassDefFoundError
The tutorial seems like it's not enough. Or updated.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow