尝试使用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;
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ^
这是什么意思,我们如何解决这个问题?
答案 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'];
}
?>
,而不是:=
。