idea scala 跑,无法在intellij IDE中的scala中找到或加载主类

I have searched for this error, but the answers were for Java,

but my case is Scala. I am trying to run this project in IntelliJ IDE

sentimenAnalysis, but it throws an error. This is also the structure of the project. Class Not found

Update 1 According to answers, Adding $ at the end of the name of search class

Wx0Ha.png

Update 2 after adding sbt task:

d00cd304a86aead401026e45485b9281.png

Update 3

My problem was resolved by importing the project, instead of getting it directly from GitHub, probably the manual configuration that Mike Allen said could resolve the problem, but I couldn't successfully apply that.

解决方案

Probably you imported project somehow wrong. I see scala folder is not highlighted as sources.

Usually, you don't even need to setup Run configuration manually for Scala SBT project. Do you have Scala and SBT Plugins in your IDE?

You should open SBT projects through "Import project" and choose "build.sbt" file. I would also recommend enabling auto-import to install all of the dependicies.

That's how it look for me:

F4pBN.png

If you still wanna make it manually your configuration should work. That's my Run configuration that works:

juhE0.png

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
©️2021 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值