“Scala中的函数式编程原则”coursera是为Eclipse准备的。
这里有一个关于在课程中使用IntelliJ而不是Eclipse的教程:http://www.guardian.co.uk/info/developer-blog/2012/sep/21/funtional-programming-principles-scala-setting-up-intellij
但是,它会失败,出现以下错误:
sbt
gen-idea
[error] Not a valid command: gen-idea
[error] Expected '/'
[error] Expected ':'
[error] Not a valid key: gen-idea
[error] gen-idea
[error] ^会有什么问题呢?
发布于 2013-04-09 04:58:02
根据这个错误,看起来您没有安装sbt intellij插件。您需要将此依赖项添加到sbt配置中:
addSbtPlugin("com.github.mpeltonen“% "sbt-idea”% "1.3.0")
您可以将这一行添加到您的_ project /project/plugins.sbt中-这将起作用,但您必须为每个项目执行此操作(请注意,您可能必须创建plugins.sbt)。
一种更方便的方法:在~/.sbt/plugins/build.sbt中添加依赖项-这样,插件将在每次启动sbt时可用,而不管特定于项目的配置是什么。
发布于 2013-04-09 04:35:09
在running the first example of playframework in IntelliJ on a Mac OSX中安装scala 2.10.0和IntelliJ
如果你使用的是scala playframework,那么临时清理ivy2 (because there is a namespace collision with sbt-idea and playframework)
rm -rf ~/.ivy2请按照中所述进行操作:
https://class.coursera.org/progfun-002/forum/thread?thread_id=9&post_id=24#post-24
http://www.guardian.co.uk/info/developer-blog/2012/sep/21/funtional-programming-principles-scala-setting-up-intellij
例外的是:
addSbtPlugin("com.github.mpeltonen“% "sbt-idea”%“1.2.0”)
那它就行了,至少对我来说是这样。
https://stackoverflow.com/questions/15888438
复制相似问题