Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij android project setup - run button is disabled

I have an android project with dependencies on actionbar sherlock. It compiles without error but the run Button is disabled. I have another android project that works fine and runs on my device, but I cannot see the difference between those projects - except I am able to run the one project and I am not able to run the other.

I would provide screenshots, but actually I don't have any idea where this problem is located.

Any idea?

like image 932
Anthea Avatar asked Feb 15 '13 10:02

Anthea


People also ask

Why is run button disabled in IntelliJ?

Open the source code, right-click and hit run using the option run "filename. java". IntelliJ will make the configuration for you and then you can click the run button after the configuration is made by the IDE.

How do I get the run option in IntelliJ?

From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . on the toolbar or press Alt+Insert . The list shows the run/debug configuration templates.

How do I run an IntelliJ project?

To run IntelliJ IDEA, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin. Run the IntelliJ IDEA app from the Applications directory, Launchpad, or Spotlight.

Why Run button is disabled in PyCharm?

If you're creating a project from existing source: and If the existing source directory contains a lot of data/files: the Run option (and others, assumably) are disabled until PyCharm is finished indexing the contents in the project.


3 Answers

Did you set up a Run/Debug Configuration?

You should see a drop down to the left of the Run button; click it and click "Edit Configurations". In the top-left, click the "+" to add a new configuration, and select "Android Application". Select the Module (usually it's just your main project) to launch, choose the Target Device (hardware or emulator), give it a name, and then click OK.

Now you should be able to run with that configuration.

like image 92
Kevin Coppock Avatar answered Sep 18 '22 20:09

Kevin Coppock


In 2017, IntelliJ idea wants to index stuff for several minutes before it will enable the Run option.

This appears to be by design.

like image 31
Warren P Avatar answered Sep 19 '22 20:09

Warren P


  1. Right-click the class file with the main method on the project view.
  2. Select Run.

Run configuration is created automatically so that you don't have to set it.

like image 45
Tonnie Avatar answered Sep 18 '22 20:09

Tonnie