简体   繁体   English

无法在Eclipse Scala Ide上处理导入的sbt项目

[英]Unable to Work on Imported sbt project on Eclipse Scala Ide

I Have downloaded couple of projects from github , which are sbt projects, and imported in Scala IDE. 我已经从github下载了几个项目,它们是sbt项目,并导入了Scala IDE。 But When I try to run them...they are not showing in run configuration. 但是当我尝试运行它们时...它们没有显示在运行配置中。

I think for sbt project there is some another way to import in eclipse. 我认为对于sbt项目,还有另一种导入eclipse的方法。

Please Help. 请帮忙。

Attaching the screenshot of the project. 附上项目的屏幕截图。

[Screenshot] [截图]

you should convert it to eclipse projects first. 您应该先将其转换为Eclipse项目。

1.you need to add eclipse plguins in your project/plugins.sbt, something like this: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 1.您需要在项目/plugins.sbt中添加eclipse企鹅,如下所示: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

2.run sbt In CLI from your peoject fold and type eclipse , wait util it successes. 2.在您的命令行中从CLI文件夹中运行sbt并输入eclipse ,等待它成功。 Now , you can import it to eclipse (eclipse project needs .project and .classpath the two files) 现在,您可以将其导入eclipse(eclipse项目需要.project和.classpath这两个文件)

BTW, sbt and eclipse command may be a little slow, be patient. BTW, sbteclipse命令可能会有些慢,请耐心等待。

Hope it helps. 希望能帮助到你。

Finally, What I Understood is, For Scala SBT Development, IntelliJ is the preferred IDE. 最后,我了解的是,对于Scala SBT开发,IntelliJ是首选的IDE。 Almost All projects which are hosted on Github have build.sbt in it. Github上托管的几乎所有项目都具有build.sbt。 Like for Android Development everyone prefers Android Studio. 就像Android开发一样,每个人都更喜欢Android Studio。 LikeWise for scala use IntelliJ at least for now. 用于Scala的LikeWise至少现在使用IntelliJ。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM