Ranjan Bajracharya
5 min readDec 6, 2017

Android Development — Part 1 Installation and setup of android studio

Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones ,tablets and also TV and smart watches. For development of android android studio is used mostly. You can download android studio from here .

Installation of Android studio for window:

Before downloading android studio you need to setup Java Development Kit to make sure your computer understands Java. You can download it from here.

Download android studio and double click on the file to open setup wizard.Accept all the default configuration.

When you reach this screen, make sure that all components are selected.

After finishing the install, the Setup Wizard will download and install some additional components. Be patient, this might take some time depending on your internet speed.

When you are finished, you will see this window

Similar goes for Mac and Linux.

Setup first Project

First open android studio and click Start a new Android Studio Project. An Android Studio Project typically means the code and files for one Android Application.

Application name is what you give your application name. Company domain is for hosting domain for unique identification of app. Since, Kotlin is official programming language for android you can select it else android java will be default.

Select Phone and Tablet for mobile devices. API 16 defines the target version i.e this app will work from Android 4.1 and before that release.

Android provides different activity with new release. For now select Empty Activity.

Click Finish .

Creating project may depend on process. So, be cool with it.

This is the screen after project is created.

First, be sure the Project window is open (select View > Tool Windows > Project) and the Android view is selected from the drop-down list at the top of that window. You can then see the following files:

app > java > com.example.myfirstapp > MainActivity.java :This is the main activity (the entry point for your app). When you build and run the app, the system launches an instance of this Activity and loads its layout.

app > res > layout > activity_main.xml :This XML file defines the layout for the activity's UI. It contains a TextView element with the text "Hello world!".

app > manifests > AndroidManifest.xml: The manifest file describes the fundamental characteristics of the app and defines each of its components.

Gradle Scripts > build.gradle :You'll see two files with this name: one for the project and one for the "app" module. Each module has its own build.gradle file, but this project currently has just one module. You'll mostly work with the module's build.gradle file to configure how the Gradle tools compile and build your app

Run Your App

Run on a real device

Set up your device as follows:

  1. Connect your device to your development machine with a USB cable. If you’re developing on Windows, you might need to install the appropriate USB driver for your device.
  2. Enable USB debugging in the Developer options as follows.

First, you must enable the developer options:

  1. Open the Settings app.
  2. (Only on Android 8.0 or higher) Select System.
  3. Scroll to the bottom and select About phone.
  4. Scroll to the bottom and tap Build number 7 times.
  5. Return to the previous screen to find Developer options near the bottom.

Open Developer options, and then scroll down to find and enable USB debugging.

Run the app on your device as follows:

  1. In Android Studio, click the app module in the Project window and then select Run > Run .
  2. In the Select Deployment Target window, select your device, and click OK.

Android Studio installs the app on your connected device and starts it. You can see Hello World in your screen

Run on an emulator

Run the app on an emulator as follows:

  1. In Android Studio, click the app module in the Project window and then select Run > Run .
  2. In the Select Deployment Target window, click Create New Virtual Device.

3. In the Select Hardware screen, select a phone device, such as Pixel, and then click Next.

4. In the System Image screen, select the version with the highest API level. If you don’t have that version installed, a Download link is shown, so click that and complete the download.

6. Click Next.

7. On the Android Virtual Device (AVD) screen, leave all the settings alone and click Finish.

8. Back in the Select Deployment Target dialog, select the device you just created and click OK.

Android Studio installs the app on the emulator and starts it. You can see Hello World in your screen

Ranjan Bajracharya
Ranjan Bajracharya

Written by Ranjan Bajracharya

MSP 2017. Graduation in computer science and information technology. Studying MBA.

No responses yet