Open AndroidStudio project from command line on OSX

Easiest way to use it from command line is to create a shortcut using Android Studio's built in tool: Menu --> Tools --> Create command line launcher.

After that, just call studio myprojectname.

enter image description here


In your ~/.bash_profile add

alias AndroidStudio="open -a /Applications/Android\ Studio.app"

Then reload your terminal and you can now do

AndroidStudio ~/my_android_project

how about:

open -a /Applications/Android\ Studio.app /path/to/my_android_project

For Windows user, use the following command:

start "" "C:\Program Files\Android\Android Studio\bin\studio64.exe" "X:\path\to\my_android_project"