Book Image

Android Studio 4.1 Development Essentials – Kotlin Edition

By : Neil Smyth
Book Image

Android Studio 4.1 Development Essentials – Kotlin Edition

By: Neil Smyth

Overview of this book

Android 11 has a ton of new capabilities. It comes up with three foci: a people-centric approach to communication, controls to let users quickly access and manage all of their smart devices, and privacy to give users more ways to control how data on devices is shared. This book starts off with the steps necessary to set up an Android development and testing environment, followed by an introduction to programming in Kotlin. An overview of Android Studio and its architecture is provided, followed by an in-depth look at the design of Android applications and user interfaces using the Android Studio environment. You will also learn about the Android architecture components along with some advanced topics such as touch screen handling, gesture recognition, the recording and playback of audio, app links, dynamic delivery, the AndroidStudio profiler, Gradle build configuration, and submitting apps to the Google Play Developer Console. The concepts of material design are also covered in detail. This edition of the book also covers printing, transitions, and cloud-based file storage; foldable device support is the cherry on the cake. By the end of this course, you will be able to develop Android 11 Apps using Android Studio 4.1, Kotlin, and Android Jetpack. The code files for the book can be found here: https://www.ebookfrenzy.com/retail/as41kotlin/index.php
Table of Contents (95 chapters)
95
Index

2.3 Installing Android Studio

Once downloaded, the exact steps to install Android Studio differ depending on the operating system on which the installation is being performed.

2.3.1 Installation on Windows

Locate the downloaded Android Studio installation executable file (named android-studio-ide-<version>-windows.exe) in a Windows Explorer window and double-click on it to start the installation process, clicking the Yes button in the User Account Control dialog if it appears.

Once the Android Studio setup wizard appears, work through the various screens to configure the installation to meet your requirements in terms of the file system location into which Android Studio should be installed and whether or not it should be made available to other users of the system. When prompted to select the components to install, make sure that the Android Studio and Android Virtual Device options are all selected.

Although there are no strict rules on where Android Studio should be installed on the system, the remainder of this book will assume that the installation was performed into C:\Program Files\Android\Android Studio and that the Android SDK packages have been installed into the user’s AppData\Local\Android\sdk sub-folder. Once the options have been configured, click on the Install button to begin the installation process.

On versions of Windows with a Start menu, the newly installed Android Studio can be launched from the entry added to that menu during the installation. The executable may be pinned to the task bar for easy access by navigating to the Android Studio\bin directory, right-clicking on the executable and selecting the Pin to Taskbar menu option. Note that the executable is provided in 32-bit (studio) and 64-bit (studio64) executable versions. If you are running a 32-bit system be sure to use the studio executable.

2.3.2 Installation on macOS

Android Studio for macOS is downloaded in the form of a disk image (.dmg) file. Once the android-studio-ide-<version>-mac.dmg file has been downloaded, locate it in a Finder window and double-click on it to open it as shown in Figure 2-1:

Figure 2-1

To install the package, simply drag the Android Studio icon and drop it onto the Applications folder. The Android Studio package will then be installed into the Applications folder of the system, a process which will typically take a few minutes to complete.

To launch Android Studio, locate the executable in the Applications folder using a Finder window and double-click on it.

For future easier access to the tool, drag the Android Studio icon from the Finder window and drop it onto the dock.

2.3.3 Installation on Linux

Having downloaded the Linux Android Studio package, open a terminal window, change directory to the location where Android Studio is to be installed and execute the following command:

unzip /<path to package>/android-studio-ide-<version>-linux.zip

Note that the Android Studio bundle will be installed into a sub-directory named android-studio. Assuming, therefore, that the above command was executed in /home/demo, the software packages will be unpacked into /home/demo/android-studio.

To launch Android Studio, open a terminal window, change directory to the android-studio/bin sub-directory and execute the following command:

./studio.sh

When running on a 64-bit Linux system, it will be necessary to install some 32-bit support libraries before Android Studio will run. On Ubuntu these libraries can be installed using the following command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

On Red Hat and Fedora based 64-bit systems, use the following command:

sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686