错误:值<不是sbt.TaskKey的成员[sbt.File]

时间:2017-08-19 03:46:17

标签: scala sbt aws-lambda

尝试使用aws lambda运行sbt并关注Writing AWS Lambda Functions in Scala的博文。

我开始在build.sbt文件中添加:

javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")

lazy val root = (project in file(".")).
  settings(
    name := "lambda-demo",
    version := "1.0",
    scalaVersion := "2.11.4",
    retrieveManaged := true,
    libraryDependencies += "com.amazonaws" % "aws-lambda-java-core" % "1.0.0",
    libraryDependencies += "com.amazonaws" % "aws-lambda-java-events" % "1.0.0"
  )

mergeStrategy in assembly <
   {
    case PathList("META-INF", xs @ _*) => MergeStrategy.discard
    case x => MergeStrategy.first
   }
}

sbt compile之后我收到此错误:

  

错误:值&lt;不是sbt.TaskKey [sbt.File]的成员   mergeStrategy in assembly&lt;
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^

这是什么意思,我们如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

整个过程中某处都存在复制粘贴错误。它应该是 $data = json_decode(getResource('https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-mco'),TRUE); // $data = json_decode(file_get_contents('https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-mco'),TRUE); return $data['result'][0]['Ask']; } ?> ,而不是:=