【Junit】The import org.junit.Test conflicts with a type defined in the same file报错

来源:互联网 发布:php吧 编辑:程序博客网 时间:2024/06/05 17:23

引入Junit后,进行单元测试,莫名其妙报了个这样的错误

The import org.junit.Test conflicts with a type defined in the same file

  • 原因一:常规原因,导入的jar包相冲突
  • 原因二:狗血原因,写junit测试的Java类名为Test.java

我的错误是类名用了Test。欲哭无泪!



转载自:http://www.cnblogs.com/anny0404/p/5275610.html

阅读全文
0 0
原创粉丝点击