1

I've installed an IntelliJ IDEA Community Edition 2018.2.4 x64. I've cloned a Project from Git (I learn a course on the "coursera").

The first task was: "Click the green arrow at the left side from the code.." I haven't any arrows. I can't run it from main menu, the programm ask me about configuration. What exactly I need to do?

  • "Run" is not available. See here
  • Asking about configurations. See here
  • Configuration's window. See here
Marcello B.
  • 4,177
  • 11
  • 45
  • 65
  • I don't think your project is imported correctly (that's why you have no green play arrows next to the main methods), there is problem in the first screenshot in the "Event Log" window. Can you click "Maven Projects" tool window (on the right) and click the refresh button? What happens if you run `mvn compile` inside main project folder (where pom.xml is)? – Strelok Oct 16 '18 at 05:28
  • When I click "Maven Projects" tool window and then the refresh button I see: In the Maven Project window "Zou may use + to add a project or a "refresh" to let plugin find all pom.xml files under the project roots and import them" In log: Unable to import maven project: See logs for details pom.xml - nothing happend... http://prntscr.com/l6n41d – Valeriia Zubrizki Oct 16 '18 at 09:08
  • 1
    Ok you didn't import the project properly, close current project and go to File -> New -> Project from existing sources and choose the root pom.xml file from the cloned repo – Strelok Oct 16 '18 at 23:01

3 Answers3

1

The problem solved. It was fun.. The firewall blocked all functions of mavel,jdk and part of IDEA. Adding to exceptions didn't help. Switching off the Firewall - helped. Strange were: Empty repositories of maven, the same settings as at the another computers where it have worked.
Now everything is working.

0

You have to create a new configuration for Kotlin and specify the main class which would be lesson1.task1.SimpleKt. Then the disabled arrow will turn green and be clickable.

If you want to run the other examples you have to create a new configuration for each one since they all have their own .kt file with a main function.

Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121
  • I see. And now, here is a new question... I need to go to - configuration - templates - Kotlin and input the main class: lesson1.task1.Simple.kt choose the working directory: my project. Apply, ok. Is it right? It did not help))) http://prntscr.com/l6ic0m – Valeriia Zubrizki Oct 15 '18 at 23:17
  • Specify the package exactly like this lesson1.task1.SimpleKt (not Simple.kt) – Willi Mentzel Oct 16 '18 at 00:08
0

Right Click on Project Folder->Module Settings -> Add src folder in sources in the following way

enter image description here

Rachita Nanda
  • 4,509
  • 9
  • 42
  • 66