Answer the question
In order to leave comments, you need to log in
Why is there a "function main is not found in class Main" error?
I configured Edit Configurations manually, but the program sees the Main class, but for some reason the method is not
package com
class Main {
fun main(args: Array<String>) {
println("Hello")
}
}
Answer the question
In order to leave comments, you need to log in
Because it has to be static. Just remove it from the class to the global scope or put it in a companion object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question