Category Archives: Android Tutorials

Setup android emulator with android studio

Setup android emulator with android studio:

In this Android Tutorial we will se.It is not necessary to have an android phone to test the android application.Android Studio comes with built in application that will create an android phone/tablet/wear or android  TV  so that you can test your application.This application is known as Android Virtual Device (AVD).To start AVD service click:

How to create an Android Emulator
Click this icon to start Android Virtual Device

Now After you have clicked the icon in red Android Virtual Device service will start .This window will open:

How to create android emulatior

Setup android emulator with android studio is very easy and user friendly.Now click on Create Virtual Device and this window will appear:

Creating Android Virtual device

This where you select the type of Android emulator you want to create.Now we are creating emulator for phone so select Category to Phone.Now we have to select the hardware type.You have to carefully choose the hardware type according to your computer RAM.If you have 8 GB or more than 8 GB RAM than you can select Nexus 6,5,4,S or Nexus One because Nexus device takes a lot of RAM.If you are running Android Studio on 4 GB or less than 4 GB RAM  scroll down and select this phone:

Setup android emulator on computer with less RAM
Select this hardware if you are running a computer with less RAM (4 GB or less than 4 GB)

Now after selecting this click next.After clicking next it’s time to select an Android Image.

What is Android System Image:

Android System Image is the the android version that your Android Emulator will be running.

If you don’t have system image installed.Click download and Android SDK service will start up and you will be able to download a system image from there.If you have system image installed select it.I am running on Less RAM so i will select :

creating an android emulator

 

Select the (x86) image because it gives better performance on window.You are now very near to setup android emulator with android studio.Now click next and this window will appear:

 

Cannot create Android Emulator
Simply remove Inches sign ” from the AVD name to remove the error

Now remove the semicolon sign and the error from AVD Name will go.You can rename the emulator according to your own choice.Now check the option (Store a snapshot for faster startup).After this click finish and android emulator will be created.After clicking finish this window will appear and you will now be able to start android emulator:

How to create android emulator

Now our emulator is created to start it click the button in the red circle.When you will click the button in red your android emulator will start up in the taskbar. This is how you setup android emulator with android studio.Now it will take some time to load and after it has completed loading up your android emulator will look like:

Setup android emulator with android studio

 

How to unlock your Android Emulator:

To unlock your android emulator take the pointer of the mouse to the lock sign right click it now drag your mouse to left side while holding  the right click.This method is for (Android version 2.3) for other method it will be difficult.

Now you know how to Setup android emulator with android studio and you can easily test your Application on Android.

 

 

 

How to make your first Android Application

How to make your first Android Application:

This android tutorial will tell you how to create your android application.These android lectures are specially for beginners.After you have installed Android studio start it by  double clicking  it’s icon on the Desktop.After you have clicked on it a loading screen will open.

Android Studio loading screen
Android Studio loading screen

After the green bar has reached the right end.This menu will appear:

Android studio start up screen
Android studio start up screen

Now you can see you can set up a new Project by simply clicking Start a new Android Studio project.This is where you will start to learn to how to make your first Android Application

We will start by simply creating a Hello World  application.Now after you have clicked the Start a new Android Studio Project this window will appear:

Creating a new Android Application
Creating a new Android Application

Now in this window you have to give your application name.Which is very clear that it is going to be the name of your application.Now you have to set your company domain you have to set it up your self it must be unique because when you are uploading your application on google play this should not be used by any other person.

Next is the package name which is going to be reverse of the company domain and then it will have the application name.You can edit the package name by clicking on edit.

Next is the path location of your android application.now click on next.After clicking next this window will appear:

Android step by step tutorial

 

Now in the next step we have to choose the device for which we are creating the application.For these android tutorials we will only check phone and tablet.Now we have to select the minimum API for our android application.Don’t worry you are very near to learn how to make your first Android Application

What is API in android:

API is a unique integer value that is assigned to every android version.For example Ginger Bread has API 9,android honey comb  has API 10 Ice cream Sandwich has API 14,Android jelly Beans has API 21.

Greater API has greater features but it won’t run on the previous version of android for example if i create an application for android IceCream sandwich (4.0) then it won’t run on Android Ginger Bread but it will run on android JellyBeans and Android Lollipop.

This picture will help :

Android Api

 

Android Jelly Beans API

We will use API 9: Android 2.3 (Gingerbread) in these Android Application development.

Now Click next and this window will open:

Selecting Activity in Android

 

You are very near to how to make your first Android Application..Now simply select the blank activity and click next after clicking next this window will appear:

Android setting activity name

 

Now change your activity name to StartPoint.StartPoint going to be your first class.We are renaming it because it is easy to remember.Layout Name will be renamed by Android Studio it self.Now when you will click finish Hello World App will be created by default.How to make your first Android Application

 

How to make your first Android Application

How to install Android Studio

How to install Android Studio:

Android studio is official development tool for Android.There are other tools for the development of Android application like eclipse,net beans e.t.c.Eclipse adt is one of the most used application for the development of Android application but after 2015 it will no longer be updated.So we will use Android Studio in the coming Android Application Development Tutorials.

Prerequisite to install Android Studio :

Your computer should have atleast 2 GB of RAM to run Android studio.If you want to run it smoothly 8 GB RAM is preferred and Java Development Kit (JDK) should be installed.

How to install Java Development Kit (JDK):

Android is based on java so first we have to install Java Development Kit (JDK) you can download jdk from here.Click on the Java sign and it will ask you for your platform like linux or windows.

Now after you have installed JDK you have to download Android Studio which is available on Android official website.You can download it from here.

When you will execute the setup of Android studio it will ask you where u have installed the JDK.

Location of JDK

So you have to navigate to this directory then you have to click next and the setup will install the Android Studio.If u are running on a 32 bit window JDK will be installed Program Files instead of Program Files(x86).

After you have installed the Android Studio it will download some important files.So now you know How to install Android Studio:

Can i create application for android TV and android wear:

Yes,after you have installed android studio you can create a lot of stuff.Using Android studio you can create application for a lot of things like phone,tablets,android wear and android TV.

Is it necessary to have android phone for running the Application:

No it is not necessary to have android phone to test the application that you have created.You can create your own android device that will run so that you can test your application on that device the device is called android virtual device.

Once you know how to install Android Studio it is very easy to install if you need to install again.Once you have installed android studio this window will appear:

Android Application Development Tutorials

Video on how to install Android Studio: