Android Studio: Mixed topics


Opening an Android Studio project

Directly from the file system

As the following discussion shows, it does not seem to be possible to open an Android Studio project directly from the file system by double-clicking a file, in a similar way like is known from Visual Studio and .sln files:

https://stackoverflow.com/questions/20906503/what-is-the-extension-of-a-android-studio-project-file

So it seems we always have to launch Andriod Studio first and open or import our project from there.

Opening multiple projects simultaneously

In case you have on project open and want to open another project while keeping both open, just select [File–>Open], select the new project you want to open, and select the option [New Window]:

This will open the new project as a new window, which allows you to have multiple projects open at the same time.

Navigation

Reveal the active/opened file in the project file explorer

In case you have a file active/opened but can’t find where the file is located in the left panel project files explorer, you can do the following steps to reveal the position of the file in the file hierarchy:

  1. Make sure that [Project Files] is selected on the left panel.
  2. Make sure that the file, whose position in the file hierarchy you want to reveal is selected.
  3. Click on the cross-like symbol
  4. Now, you can see the position of the file revealed in the Project Files explorer

Editing

Renaming multiple occurrences of a text pattern

To rename multiple occurrences of a text pattern, mark that text, right-click with the mouse and select the option [Refractor\Rename…]:

Formating the indentations

To format the indentations in Android Studio, select the lines of code that you want to reformat and then use press [Ctrl] [Alt] [L] to reformat the code.

Troubleshooting

Error: Please select Android SDK

Problem

You open an existing project with Android Solution. You create a new run configuration. But your run configuration shows the following error:

Error: Please select Android SDK

Potential Resolution 1

This happened to me while the flutter plugin was somehow uninstalled from my Android Studio, and I, unaware of that, tried to run my flutter app as if the flutter plugin was still installed.