【Junit】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。欲哭無淚!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM