我目前正在关注 this tutorial关于使用 Robolectric for Eclipse。而且我似乎无法让它发挥作用。它不断抛出 initializationError
并且在 Failure Trace 中它有一个 java.lang.noClassDefFoundError
教程似乎还不够。或更新。
最佳答案
我找到了解决方案。我下载了错误的 Robolectric jar 文件。您必须使用找到的 jar-with-dependencies.jar
here .然后一切顺利。
关于android - Eclipse 中的 Robolectric 初始化错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23507562/