score:1

for intellj idea, probably you will need to double check your module settings, and see if your scala folder is marked as sources root.

check this url for more details: https://www.jetbrains.com/help/idea/creating-and-managing-modules.html

score:1

when i experienced this issue after recreating your situation almost exactly step-by-step, what fixed the problem was putting the scala file, in your case main.scala, in another package, named anything you want it to be, inside main/scala. ultimately, the scala file's path would be something like

main/scala/<package-name>/main.scala

then, after fixing the package name in the scala file and running the scala file through intellij, everything worked as it was supposed to.


Related Query

More Query from same tag