Android Studio Installation
Step 1 - System Requirements
Android application development can begin in the following operating systems:
- Microsoft® Windows® 8/7 / Vista / 2003 (32 or 64 bit).
- Mac® OS X® 10.8.5 or higher
- GNOME or KDE Desktop
All the tools needed to develop Android applications are open source and can be downloaded from the Internet. The following is a list of the software before the start of Android application programming required:
- Java JDK5 and later
- Java Runtime Environment 6
- Android Studio
Step 2 - Install Android Studio
Overview
Android Studio is the official Android application development IDE, based Intellij IDEA. From the official website you can download Android Studio download the latest version of Android Studio. If you are installing on Windows Android Studio newcomers find named android-studio-bundle-135.17407740-windows.exe file downloads, and run by Android Studio wizards guide.
If you are installing on a Mac or Linux Android Studio, from download Android Studio Mac or Android Studio Linux Download to download the latest version to view instructions provided with the download file. This tutorial assumes that you have installed in your environment on Windows 8.1 operating system.
installation
Make sure that before you install Android Studio, already installed Java JDK. Install Java JDK, check out Android environment to build one.
Once you start Android Studio installation, you need to set JDK5 or later path in Android Studio installation vessel.
Following picture for the Android SDK initialization JDK
Check the components needed to create an application, the following figure selected "Android Studio", "Android SDK", "Android virtual machine" and "appearance (Intel chip)".
You need to specify Android Studio on the machine and the Android SDK path. The following figure shows the default installation location on windows 8.1 64-bit architecture.
Specifies the default Android emulator ram required space for the 512M.
Finally, extract the SDK package to the local machine, which will continue for some time and use 2626M hard disk space.
Complete the above steps, you will see the end of the button, and you can open Android Studio project in the Welcome screen, as shown below:
Start by calling the new Android Studio project to start Android application development. In the new installation page to write the application name, package name and project path.
After entering the application name, began to select environmental parameters to run applications, where you need to specify the minimum SDK. For this tutorial, we chose API 21: Android 5.0 (Lollipop)
Next you need to select the mobile device installation activities, specify a default layout for your application.
Open the final stages of development tools to write the application code.
Step 3 - Creating Android Virtual Device
To test Android application requires Android Virtual Device. So before you start writing the code to create a virtual Android device. Click below the AVD Manager icon to launch Android AVD Manager.
After clicking the virtual device icon will appear in the SDK existing default virtual device. Click on "Create new Virtual device" button to create a virtual device.
If the AVD creation is successful, it means ready to Android application development. Top right, click the Close button to close the window. After completing the last step, the final restart your machine. Before starting the first example of Android, you need to understand some of the Android application development related concepts.
Hello World Examples
Before writing Hello World code, we need to know XML tags. According to app> res> layout> activity_main.xml, open the file.Specific code as follows:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <TextView android:text="@string/hello_world" android:layout_width="550dp" android:layout_height="wrap_content" /> </RelativeLayout>
Click Run> Run App run the program, the results are as follows: