I can't run my project as main class AppKt can not be loaded or found, there is also a problem with a debugger that can be connected. I attached screens of the problem
Asked
Active
Viewed 39 times
0
-
Can you check your "C:\Users\{user}\AppData\Local\JetBrains\IntelliJIdea2020.1\captureAgent" directory for 'debugger-agent.jar' & 'debugger-agent-storage.jar' are they present ? – Aakash Sharma Aug 01 '21 at 06:44
-
Yes, they are there – Damir Koblev Aug 01 '21 at 07:05
-
Is there a red cross sign like this in your IDE near build? Like this : https://i.imgur.com/1CYehLe.png – Aakash Sharma Aug 01 '21 at 08:00
-
It was until I configured AppKt as a the main class in running configurations because it is the only available default main class in such cases, but, as I understand, it can't be found or something(shown in attached pictures to my post) – Damir Koblev Aug 01 '21 at 08:15
-
So AppKt is your main class now. Do you have the main() method implemented properly in that? – Aakash Sharma Aug 01 '21 at 08:19
-
I can't fully understand what you mean(sorry), but I guess no. It tells me: Error: Could not find or load main class AppKt Caused by: java.lang.ClassNotFoundException: AppKt – Damir Koblev Aug 01 '21 at 08:54
-
Can you share your AppKt code. – Aakash Sharma Aug 01 '21 at 09:34
-
fun main(){ println("Hello World") } – Damir Koblev Aug 01 '21 at 10:46
-
Late reply, had exam :p, The code written by you is right. In the question, you should also add images of your project structure. A quick brute solution is to clean-install the IntellijIdea again. – Aakash Sharma Aug 02 '21 at 08:47