Book Image

Android Studio 3.5 Development Essentials - Java Edition

By : Neil Smyth
Book Image

Android Studio 3.5 Development Essentials - Java Edition

By: Neil Smyth

Overview of this book

Android applications have become an important part of our daily lives and lots of effort goes into developing an Android application. This book will help you to build you own Android applications using Java. Android Studio 3.5 Development Essentials – Java Edition first teaches you to install Android development and test environment on different operating systems. Next, you will create an Android app and a virtual device in Android Studio, and install an Android application on emulator. You will test apps on physical Android devices, then study Android Studio code editor and constraint layout, Android architecture, the anatomy of an Android app, and Android activity state changes. The book then covers advanced topics such as views and widgets implementation, multi-window support integration, and biometric authentication, and finally, you will learn to upload your app to Google Play console and handle the build process with Gradle. By the end of this book, you will have gained enough knowledge to develop powerful Android applications using Java.
Table of Contents (86 chapters)
86
Index

4.7 AVD Command-line Creation

As previously discussed, in addition to the graphical user interface it is also possible to create a new AVD directly from the command-line. This is achieved using the avdmanager tool in conjunction with some command-line options. Once initiated, the tool will prompt for additional information before creating the new AVD.

The avdmanager tool requires access to the Java Runtime Environment (JRE) in order to run. If, when attempting run avdmanager, an error message appears indicating that the ‘java’ command cannot be found, the command prompt or terminal window within which you are running the command can be configured to use the OpenJDK environment bundled with Android Studio. Begin by identifying the location of the OpenJDK JRE as follows:

1. Launch Android Studio and open the AndroidSample project created earlier in the book.

2. Select the File -> Project Structure... menu option.

3. Copy the path contained within the JDK...