Home Ask Login Register

Developers Planet

Your answer is one click away!

Idan Adar February 2016

How to open a Cordova (Android) project in Android Studio from the command line?

I have read about how to open the Android Studio IDE from command line.

However my question is a bit more involved.
I am creating a Cordova project and adding to it the Android platform. This is done in command line. This also builds the project (generating a Gradle-friendly Android Studio-compatible project)

My "problem" is that in order to now open the project in Android Studio I need to open the Android Studio IDE followed by clicking on the Import option.

My question is: how to open the generated Android Studio project, in Android Studio, from command line.


Joerg February 2016

In Android Studio go to Tools -> Create Command-line Launcher… and make your settings.

Then open the Shell and type:

studio path/to/android/project

In my case it is:

studio /Users/myUsername/Sites/mobileApps/myProject/platforms/android/

jcesarmobile February 2016

From the app root folder you can do

open -a /Applications/Android\ Studio.app/ platforms/android/

Post Status

Asked in February 2016
Viewed 2,701 times
Voted 9
Answered 2 times


Leave an answer

Quote of the day: live life