Http://medium.com/johnykutty
Author: medium.com/johnykutty…
Published: April 20, 2019 -2 minutes to read
Recently I started working with Flutter. I’m using Android Studio as my IDE. Switching from Xcode to Android Studio didn’t go smoothly. One of the difficulties I face is opening a project that I download from Github or elsewhere. If it’s an Xcode project, we can open it directly by double-clicking.xcodeProj or.xcWorkspace. But for Android Studio, we must first open Android Studio and import the project folder from File > Open > Select Folder.
Is there a way to open folders directly from finder? Well, no :(. But we can do a workaround. I’m going to do that.
- Open android Studio.
- Select from the menu
Tools > Creat Command-line Launcher
. - At the prompt, enter the name of the command line launcher, which I named
android-studio-launcher
. I typed Android-studio-Launcher so that I could create a command line launcher.
- Now you can type in at the terminal
android-studio-launcher /path/to/your/project
Verify. - Then open Automator and create a new service (quick on some macOS versions).
- Add a
Running shell scripts
Phase. paste/usr/local/bin/android-studio-launcher"$@"
And change the pass input fromtostdin
Instead ofparameter
。
- Save it (say open it in Android Studio) and right click on the Studio project folder > Services/Quick Actions > Open it with Android Studio. Or if you don’t have many services, this will list itself at the bottom of the context menu.
Hope this helps you save your time, at least a few seconds;)
Translation via www.DeepL.com/Translator (free version)