Book Image

Android Studio 2 Essentials - Second Edition

By : Belén Cruz Zapata
Book Image

Android Studio 2 Essentials - Second Edition

By: Belén Cruz Zapata

Overview of this book

Android Studio 2, the official IDE for Android application development, dramatically improves your workflow by letting you quickly see changes running on your device or emulator. It gives developers a unique platform by making app builds and deployment faster. This book will get you up and running with all the essential features of Android Studio 2 to optimize your development workflow. Starting off with the basic installation and configuration of Android Studio 2, this book will help you build a new project by showing you how to create a custom launcher icon and guiding you to choose your project. You will then gain an insight into the additional tools provided in Android Studio, namely the Software Development Kit (SDK) Manager, Android Virtual Device (AVD) Manager, and Javadoc. You’ll also see how to integrate Google Play Services in an Android project. Finally, you’ll become familiar with the Help section in Android Studio, which will enable you to search for support you might require in different scenarios.
Table of Contents (17 chapters)
Android Studio 2 Essentials Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Configuring the Android SDK


The essential feature that has to be correctly configured is the Android SDK. Although, Android Studio automatically installs the latest Android SDK available, so you should already have everything you need to create your first application. It is important to check it and learn how we can change it.

In the Android Studio welcome screen, navigate to Configure | Project Defaults | Project Structure. In SDK Location, you should have a selected Android SDK location as shown in the following screenshot. This selected SDK location is the default that will be used in our Android projects; however, we can change it later for specific projects that require special settings.

If you do not have an Android SDK configured in Android Studio, then we have to add it manually.

To accomplish this task, click on the ellipsis (...) button to add an Android SDK and then select the home directory for the SDK. Check whether you have it in your system by navigating to your Android Studio installation directory. You should find a folder named sdk, which contains the Android SDK and its tools. The Android Studio installation directory may be in a hidden folder; so, click on the button highlighted in the following screenshot to Show Hidden Files and Directories:

If you wish to use another Android SDK location that is different from the one included with Android Studio, select this instead. For example, if you previously used the Android Development Tools (ADT) plugin for Eclipse, you already have an Android SDK installation in your system.