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-<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.
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-<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 seconds 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