Why does sbt say “bad symbolic reference…” for test with ScalaTest?

对着背影说爱祢 提交于 2019-12-01 04:16:34
Volker Stampa

In your build.sbt you set the version of Scala to 2.10.3 with the following:

scalaVersion := "2.10.3" 

However the ScalaTest dependency uses Scala 2.11 explicitly (note the _2.11 part):

"org.scalatest" % "scalatest_2.11" % "2.2.0" % "test"

You have to use the same major scala version for both.

With sbt you can simply ensure this using %% instead of % as follows:

"org.scalatest" %% "scalatest" % "2.2.0" % "test"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!