Installing Android Studio and Running your First Android Application

1. Downloading Android Studio

Android Studio is the official integrated development environment (IDE) for the Android platform. It is developed by Google. Android Studio makes Android development much easier. You can download Android Studio from here: https://developer.android.com/studio/index.html

Installing Android Studio

When you click on “Download Android Studio” you will be shown with a popup containing Terms and Conditions. Read the terms and conditions and check “I have read and agree with the above terms and conditions” checkbox and click on “Download Android Studio for Windows”. Now Android Studio will start downloading.

 

2. Installing Android Studio

Once the download is finished,

  • Run the exe file and Click next.
  • Choose “Standard” in type of setup and click Next until the installation finishes

Once the installation is finished the application would look like this

Installing Android Studio

 

3. Creating first Android Project

Click on “Start a new Android Studio project”. Give name as “My First Android App” and domain as androiddeft.com

Creating First Android Application

Now Choose the minimum SDK as API 15: Android 4.0.3 (IceCreamSandwitch). Most of the features on Android requires Android API 15 or above and Choosing API level 15 will allow your app to run on 97.4% of Android devices. Click Next.

Creating First Android Application

Select Blank Activity and Click Next.

Creating First Android Application

Click on Finish.

 

Creating First Android Application

 

4. Creating Android Virtual Device (AVD)

Android Virtual Device helps in running the android app by emulating a virtual device. To create an AVD, choose Tools ► Android ► AVD Manager.

Creating Android Virtual Device in AVD Manager

Click on Create Virtual Device. Choose any Phone of your favorite! and Click Next.

Creating Android Virtual Device in AVD Manager

Select one of the installed System Image. If your desired API level is not installed, download it by clicking on Download.

Creating Android Virtual Device in AVD Manager

Give a name to the AVD and Click Finish.

Creating Android Virtual Device in AVD Manager

Now Click on Run () button against the newly created AVD in the AVD Manager.

Running Android application in Android Virtual Device Emulator

Wait till the virtual device boots.

 

5. Running the Android Application in Android Virtual Device (AVD)

Select Run ►Run ‘app’, to install and run your application. Now a dialogue box will appear to select the target where you wish to run the application. Select the AVD you created (Nexus 4 API 24 in my case) and click OK.

Running Android application in Android Virtual Device Emulator

Wait till the project is built and app is installed in the AVD. After successful installation the AVD would look as follows:

Running Android application in Android Virtual Device Emulator

 

7. Installing Google USB Driver

In order to run Android application a mobile device you need to install Google USB driver on your desktop. To install Google USB Driver in Android Studio,

  • Click Tools ► Android ► SDK Manager
  • Click the SDK Tools tab
  • Select Google USB Driver and click OK.

Installing USB Google Driver in Android SDK Manager

 

8. Enabling developer option in your Android phone

You need to enable developer option in your Android device in order to install and debug your apps via USB. To enable developer option in your Android phone, go to Settings ► About Phone ► Tap 7 times on “Build Number”. Once you have tapped7 times, a toast will appear saying that “You are now a Developer!”.

Enabling USB debugging in Android

Now go to Settings ► Developer Options in your Android phone and check USB debugging

Enabling USB debugging in Android

 

9. Running android application on Android phone

To run Android application on an Android phone you need to connect your phone to desktop via a USB. Go to Android Studio select Run ► Run ‘app’

Running android application on Android phone

 

From the dialogue box which shows up, select the device you have connected (Redmi Note 3 in my case) and click OK. Wait till the project is built and application gets installed in your phone. Below is the screenshot after successful installation.

Running android application on Android phone

If you face any issues do post in the comment section. We will try our best to suggest you appropriate solution.

Stay Connected

No spam guarantee.

Abhishek

Abhishek

Abhishek loves coding. His favorite is Android Development. Apart from coding he loves traveling and reading.
Abhishek

Latest posts by Abhishek (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *