Latest web development tutorials

Android Studio Installation

android_android_studio_1

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.

android_android_studio_2

Once you start Android Studio installation, you need to set JDK5 or later path in Android Studio installation vessel.

android_android_studio_3

Following picture for the Android SDK initialization JDK

android_android_studio_4

Check the components needed to create an application, the following figure selected "Android Studio", "Android SDK", "Android virtual machine" and "appearance (Intel chip)".

android_android_studio_5

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.

android_android_studio_6

Specifies the default Android emulator ram required space for the 512M.

android_android_studio_7

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:

android_android_studio_8

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.

android_android_studio_9

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)

android_android_studio_10

Next you need to select the mobile device installation activities, specify a default layout for your application.

android_android_studio_11

Open the final stages of development tools to write the application code.

android_android_studio_12

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.

android_android_studio_13

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.

android_android_studio_14

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.

android_android_studio_15

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:

android_android_studio_16