ТОП просматриваемых книг сайта:
Expert Android Studio. Dundar Onur
Читать онлайн.Название Expert Android Studio
Год выпуска 0
isbn 9781119110736
Автор произведения Dundar Onur
Жанр Зарубежная образовательная литература
Издательство John Wiley & Sons Limited
2. Launch the file you just downloaded.
3. Drag and drop the Android Studio.app icon into Applications folder, as shown in Figure 1.13.
Figure 1.13 Android Studio installer for Mac OS X
After copying Android Studio to the Applications folder, Android Studio is ready to launch. You can then remove the .dmg file from your system.
When you first launch Android Studio, it asks if you want to install Android SDK, the Android emulator, and Intel HAXM. It will also ask for the setup path for them, as shown in Figure 1.14.
Figure 1.14 Android Studio Setup Wizard for Max OS X
If you selected Intel HAXM installation, you are asked for the amount of RAM memory you want to make available for the virtual devices, as shown in Figure 1.15.
Figure 1.15 Intel HAXM configuration for Mac OS X
After you click Finish from the Emulator Settings dialog box, a window with an installation summary will display as shown in Figure 1.16.
Figure 1.16 Summary window for Max OS X installation
Installing Android Studio for Linux
Navigate to the download page shown in Figure 1.9 to download Android Studio for Linux (android-studio-ide-141.2178183-linux.zip). After you've downloaded the file, follow these steps:
1. Enter the following command to extract the setup file to the android-studio folder where you executed the command:
user@ubuntu$ unzip android-studio-ide-141.2178183-linux.zip
In this example you move the android-studio folder to the /opt directory. You can select your own home directory as well, to make it available only to you.
user@ubuntu$ sudo mv android-studio /opt
2. Start Android Studio with the ./opt/android-studio/bin/studio.sh command.
When you first launch Android Studio on Linux, it will display the screen shown in Figure 1.17.
Then the setup wizard will ask for Standard or Custom installation.
3. Select Custom installation to see the installation packages.
The wizard moves to the window shown in Figure 1.18 where you can select an Android Studio UI theme.
Figure 1.18 shows that the IntelliJ theme has been selected for this installation.
4. Select the Android Studio, Android SDK, and Emulator as shown in Figure 1.19.
5. Indicate the installation path for Android SDK in the Android SDK Location field at the bottom of the dialog box, as shown in Figure 1.19. Click Finish to complete the Android SDK installation.
Figure 1.17 Android Studio Setup Wizard for Linux
Figure 1.18 Theme selection window for Linux
Figure 1.19 Android SDK configuration on Linux
When you first launch Android Studio, you will see the Complete Installation dialog box shown in Figure 1.20, which enables you to import settings from a previous installation. Because we made a clean installation for this example, we selected the last option in the dialog box. If you have a previous installation with customization you'd like to import, you can specify your previous installation path (see the first two options in Figure 1.20).
Figure 1.20 First launch of Android Studio
Welcome to Android Studio
Welcome to the world of Android development! When you finish installing Android Studio, you will finally reach the screen shown in Figure 1.21. Android Studio is ready to work with Android projects.
Figure 1.21 Welcome to Android Studio
In this book, the main focus is on using Android Studio for development at an advanced level. Therefore, the book covers Android SDK and tools installations together with Android Studio. If you would like to explore Android SDK and tools separately, you can get the standalone installation binaries for your choice of operating system.
Standalone installation will help you either work with an IDE other than Android Studio, or to use the tools alone. The binaries are available at http://developer.android.com/sdk/index.html at the bottom of the page.
As you did in this chapter, you can download the compatible binary for your operating system and follow similar installation steps to continue. After you download and extract the SDK, you can add its location to Android Studio using Settings⇨Appearance & Behavior⇨System Settings⇨Android SDK⇨Android SDK Location.
In this chapter, we wanted to make sure you have all the necessary tools to work on the examples in the following chapters. We started by providing the requirements for the basic computer system needed to install the required software.
We then covered the installation of Android Studio for Windows, Mac OS, and Linux. We continue with what is required to begin Android application development in Android Studio in Chapter 2.
Chapter 2
Android Studio Basics
WHAT'S IN THIS CHAPTER?
• How to create an Android Studio project
• Android project structure
• Creating and configuring virtual devices
• Building and running your project via ADB
• Migrating Android projects from Eclipse IDE
Welcome to Android Studio! Whether you are an Eclipse-based ADT veteran or a total newbie to Android development, you will enjoy Android Studio, which is based on IntelliJ IDEA and offers new tools, a UI editor, a whole new build system, memory/CPU analyzers, and many more new features and functionalities.
After long years of the Eclipse-based ADT plugin suite, Google announced (at Google I/O 2014) that Android Studio would