Reputation: 81
I've encountered a problem where on all of my applications, there's a red cross on the top right. I can run it, but the cross doesn't seem to go away.
I've opened the run/debug configurations and it says Warning : Main method not found. I don't understand why it's not found when I already have a corresponding main class and method for each and every application.
I tried to close the project, restarting IntelliJ, restarting my laptop, refreshing my desktop, refresh Gradle by clicking Reimport All Gradle Projects, rebuild the project and clicking Invalidate Caches / Restart. I also tried other suggestions I found on StackOverflow such as deleting the .idea folder. Nothing. The red cross still shows up. I've also realized that I do not have the out folder in all of my Applications.
Upvotes: 8
Views: 10260
Reputation: 71
I just set the language level to equal my SDK version at Project Structure. Finally, it is disappeared.
Upvotes: 7
Reputation: 506
File->Project structure ->SDKs
Upvotes: 6
Reputation: 729
In Project Settings, First make sure SDK path is correct. Preferably install and use your own SDK. Then use the same SDK in Project and Modules in Project Settings.
Upvotes: 4
Reputation: 2904
Try to copy src and gradle folders and buil.gradle and settings,gradle files in separate folder. Then open this new folder as new project in intellij. Then intellij will propose Import as gradle project... - push it. If problem remained see you build.gradle
Upvotes: 0