使用eclipse使用ant build运行robolectric时出现java.lang.ClassCastException错误

时间:2014-10-09 11:58:37

标签: android eclipse ant robolectric

这里我遇到麻烦,为Android运行robolectric测试用例时说j ava.lang.RuntimeException: java.lang.ClassCastException:com.test.MyTestRunner cannot be cast to com.xtremelabs.robolectric.internal.RobolectricTestRunnerInterface

注意我正在使用JUNIT 4.11 jar

1 个答案:

答案 0 :(得分:0)

我发现这个RobolectricTestInterface无法与JUUNIT 4.11 jar一起使用,所以我使用旧版本,它完美地运作