Reputation: 148514
I've already read both answers (this and this ) but none of them seems to relate 100%.
I'm using intelliJ 13.1.6
When I right click an Activity , I do see "Run"
However when I'm right clicking the main root :
I only see "All Tests" :
I have already tried : Invalidate cache & tried to see history , butthe history is only from yesterday(?) but this problem is almost a week now :
Question:
How can I make the Run to be the same as it was ? ( I mean with "Run Myproject"
)
One thing to mention , in the top right cordner , I can run the project via :
Upvotes: 2
Views: 1797
Reputation: 7082
This is normal. By clicking what you called "root" you are selecting the whole project. As such, the IDE will let you run all the tests it can find inside. If you want other options, you will have to find a specific element (Activity, test etc.) and right-click it to get the default run options for it's type.
However, if you want to use the proper way of running in Android Studio, please open the drop-down next to the Run green arrow on the UI (last picture in your question). In there, select Edit Configurations... and define any special configurations you want.
Upvotes: 2
Reputation: 8262
That is the default behaviour of Idea. The question you have to ask yourself: What do I expect to run if you have multiple choices in your project? You might have an additional simple class with a main method in your project. So it is ambiguous for Idea what to start.
As S.D. pointed out in the comment: Create a new (or use the existing) run configuration for your project. That's what happens as a side effect if you call Run on your Activity class. In this configuration you can configure all parameters needed for running your app.
Upvotes: 1