将我的游戏框架版本更新为 2.2.1
C:\>where play
C:\apps\play-2.2.1\play
C:\apps\play-2.2.1\play.bat
在进行构建时,我收到以下错误,如下所示。
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.2.1: not found
将我的游戏框架版本更新为 2.2.1
C:\>where play
C:\apps\play-2.2.1\play
C:\apps\play-2.2.1\play.bat
在进行构建时,我收到以下错误,如下所示。
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.2.1: not found
添加这个:
resolvers += "Typesafe repository" at
"http://repo.typesafe.com/typesafe/releases/"
to project/plugins.sbt
,并确保您的顶层build.sbt
有这一行:
playScalaSettings
我不知道它需要比这更复杂的任何原因,就像您自己的回答一样。
通过在 中输入以下条目来解决Resolvers.scala
:
import sbt._
import scala.xml.XML
object Resolvers {
/*
# Online play 2.2.0 repository
#
*/
val onLinePlayRepo = "Online Play Repository" at
"https://private-repo.typesafe.com/typesafe/maven-releases/play/"
val remResolvers = Seq(localMaven,
localIvy,
localPlay,
sonatypeReleases,
sonatypePublic,
typesafeSnapshots,
typesafeReleases,
mavenRepository,
mavenRepositoryOne,
onLinePlayRepo)
还在 build.sbt 中添加了以下条目。
import sbt._
resolvers += "Online Play Repository" at
"http://repo.typesafe.com/typesafe/simple/maven-releases/"
如果您在代理后面,则应将 https 代理设置为 http 代理。
HTTPS
-Dhttps.proxyHost=host -Dhttps.proxyPort=port
HTTP
-Dhttp.proxyHost=host -Dhttp.proxyPort=port