What is this asking for when it say's the "No Main Class specified" in configuration settings. When I try to run my Kotlin code, this keeps coming up. I have never coded in Kotlin before(that's why I'm doing Hello World), and my only code is the one typed at the top.(If classes are like they are in Python, I have none here in the code).
当它在配置设置中显示“未指定主类”时,这是什么要求。当我试图运行我的Kotlin代码时,它总是出现。我以前从来没有用Kotlin编写过代码(这就是我做Hello World的原因),我唯一的代码是在顶部键入的代码。(如果类类似于它们是用Python编写的,那么我的代码中没有一个)。
Picture of the screen when I try to run it
当我尝试运行它时屏幕的图片
更多回答
Now It say's "Class MainKt not found in module 'kotlin-crash-course.test'
现在它显示“在模块‘kotlin-crash-Course.test’中找不到类MainKt‘
I suppose you need to move your "Main.kt" under "/src/main/kotlin"
我想您需要将“Main.kt”移到“/src/main/kotlin”下。
Yeah that was the issue, now it's been working.
是的,这就是问题所在,现在它已经奏效了。
优秀答案推荐
我是一名优秀的程序员,十分优秀!