[其他]@RunWith(TestClassRunner.class)报Class<TestClassRunner> cannot be resolved to a type

来源:互联网 发布:贷款被大数据什么意思 编辑:程序博客网 时间:2024/06/09 20:46

- -今天学了一下Junit,但是添加Junit包后,其它地方都没错了,唯独@RunWith(TestClassRunner.class)这行报错,搞得十分尴尬。

原因:所加载的Junit版本过低,并没有这个TestClassRunner.class类

解决:去下载较新版本的Junit,下载链接(里面有着各种版本,去下载你所需要的版本):http://cn.jarfire.org/junit.html

0 0