Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open AndroidStudio project from command line on OSX

I would like to open an AndroidStudio project from the command line on my Mac. Something like:

~ $ AndroidStudio --path ~/my_android_project 

Is this possible in some way?

like image 737
PKeno Avatar asked Feb 12 '16 13:02

PKeno


People also ask

How do I open AVD in terminal?

Starting the emulator Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]

What app can be used to access the command line on Macos?

The Terminal app is in the Utilities folder in Applications. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command-space to launch Spotlight and type "Terminal," then double-click the search result.


2 Answers

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

like image 176
Amir Uval Avatar answered Sep 30 '22 15:09

Amir Uval


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"

like image 31
Grady Player Avatar answered Sep 30 '22 16:09

Grady Player