The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Getting Around Android Studio

This chapter will serve as a quick tour of the Android Studio IDE, to help you get settled in. Other Android-specific capabilities of Android Studio will be explored in the chapters that follow.

Navigating The Project Explorer

After the main editing area — where you will modify your Java source code, your resources, and so forth — the piece of Android Studio you will spend the most time with is the project explorer, usually available on the left side of the IDE window:

Android Studio Project Explorer, Showing Android Project View
Figure 34: Android Studio Project Explorer, Showing Android Project View

This explorer pane has two main “project views” that an Android developer will use: the Android project view and the classic project view.

Android Project View

By default, when you create or import a project, you will wind up in the Android project view.

In theory, the Android project view is designed to simplify working with Android project files. In practice, it may do so, but only for some advanced developers. On the whole, it makes the IDE significantly more complicated for newcomers to Android, as it is rather difficult to see where things are and what relates to what.

We will return to the Android project view a bit later in the book and explain its benefits relative to resources and Gradle’s source sets.

However, for most of the book — most importantly, for the tutorials – we will use the classic project view.

Classic Project View

To switch to the classic project view, click the pair of arrowheads to the right of the “Project Files” tab just above the tree in the explorer, and choose Project:

Android Studio Project Explorer, Showing Project View Drop-Down
Figure 35: Android Studio Project Explorer, Showing Project View Drop-Down

On some machines, in some cases, the pair of arrowheads is instead a single drop-down arrowhead next to the currently-chosen view (e.g., Android).

Switching to the project view will change the contents of the tree to show you all of the files, in their associated directories:

Android Studio Project Explorer, Showing Classic Project View
Figure 36: Android Studio Project Explorer, Showing Classic Project View

This project view is much like its equivalent in other IDEs, allowing you to find all of the pieces of your Android project. We will be exploring what those pieces are, and how their files are organized in our projects, in the next chapter.

Context Menus in the Explorer

Right-clicking over a directory or file in the explorer will give you a context menu with a variety of options. Some of these will be typical of any sort of file manager, such as “cut”, “copy”, and/or “paste” options. Some of these will be organized according to how Android Studio manages application development, such as the “Refactor” sub-menu, where you can rename or move files around. Yet others will be specific to Android Studio, such as the ability to invoke wizards to create certain types of Android components or other Java classes.

Opening Files from the Explorer

Double-clicking on a file usually opens that file in a tab that allows you to edit that file, using some sort of editor.

Some file types, like images, can be opened but not edited, as Android Studio does not have editors for all file types.

Running Projects

The preview of this section apparently resembled a Pokémon.

Viewing Output

The preview of this section was last seen in the Bermuda Triangle.

Accessing Android Tools

The preview of this section did not survive Thanos's finger snap.

Android Studio and Release Channels

The preview of this section was stepped on by Godzilla.

Visit the Trails!

The preview of this section is in the process of being translated from its native Klingon.