我需要在我最简单的scala项目中安装一些依赖项(我正在传递一些教程),其中一个依赖项来自github。我的build.sbt看起来是这样的:
import sbt._
lazy val root = Project("root", file("."))
.dependsOn(smile)
.settings(
name := "Xyclade ML practical examples",
version := "1.0",
scalaVersion := "2.10.6",
sbtVersion := "0.13.9",
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10.2"
)
lazy val smile = ProjectRef(uri("https://github.com/haifengl/smile.git#master"), "root")也许,我缺少了一些基本的scala/sbt知识(我是一个完整的菜鸟),但是:
1) import com.github.haifengl._与object github is not a member of package com一起失败
2) import smile._导致not found: object smile错误。
据我所知,这个库包应该叫做com.github.haifengl:https://github.com/haifengl/smile/search?utf8=%E2%9C%93&q=com.github.haifengl&type=Code
发布于 2015-12-23 10:13:53
您确定com.github.haifengl包在您提到的github项目中吗?它是否存在于某些依赖关系中?
不应该将ProjectRef添加到github项目中,最好将其添加到依赖项中:
"com.github.haifengl" % "smile-core" % "1.0.4"如下所示:
import sbt._
lazy val root = Project("root", file("."))
.settings(
name := "Xyclade ML practical examples",
version := "1.0",
scalaVersion := "2.10.6",
sbtVersion := "0.13.9",
libraryDependencies += Seq(
"org.scala-lang" % "scala-swing" % "2.10.2",
"com.github.haifengl" % "smile-core" % "1.0.4"
)https://stackoverflow.com/questions/34433175
复制相似问题