gpt4 book ai didi

What is IntelliJ asking for when they say "No main class specified" in configuration settings?(当IntelliJ在配置设置中说“未指定主类”时,IntelliJ要求什么?)

转载 作者:bug小助手 更新时间:2023-10-28 21:47:07 29 4
gpt4 key购买 nike



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.

是的,这就是问题所在,现在它已经奏效了。

优秀答案推荐
更多回答

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com