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

来源:互联网 发布:店铺如何加入农村淘宝 编辑:程序博客网 时间:2024/06/01 09:03

原文:The import org.junit.Test conflicts with a type defined in the same file报错

**引入Junit后,进行单元测试,莫名其妙报了个这样的错误
The import org.junit.Test conflicts with a type defined in the same file
**原因一:常规原因,导入的jar包相冲突
原因二:狗血原因,写junit测试的Java类名为Test.java
此处补充一点,如果包名也是Test,仍然会报这个错误!!**
我的错误是类名用了Test。欲哭无泪!**

第一次遇到这种错误,不写代码光看书或者视频,这些错误遇不到真的就学不到东西啊!

阅读全文
0 0