If you want to start your adventure as an android developer, but you don’t know how ? find out theses basic steps! This tutorial is designed for students who are new to programming, and want to learn how to develop Android apps.

What is Android ?

Android Inc. founded in Palo Alto, california ,united states in October 2003 by Andy Rubin,rich miner, nick sears and Chris white to develop. In 17th August 2005, Google acquired android Incorporation. Since then, it is in the subsidiary of Google Incorporation.

It is a open source software platform and operating system for mobile devices and based on the Linux kernel. Android was developed by Google and the Open Handset Alliance (OHA), a coalition of hardware, software and telecommunications companies. Android has its own virtual machine i.e. Dalvik Virtual Machine (DVM), which is used for executing the android application. Android allows writing managed code in Java, Kotlin …

Install Android IDE :

To start your journey in the field of Android App Development you need to have a basic knowledge of java and xml basic , then start development with simple apps .

It’s not an easy process to set up your computer for Android development, but it’s not difficult, either. The basic steps are:

Install Java Development Kit ( JDK ) on your Computer. Install the Android SDK.

Install the Android SDK ( You can choose either of them ):

Install Eclipse, the Integrated Development Environment (IDE) recommended for Android development . Or

Install Android Studio, the Integrated Developmet Environment (IDE) develped by Google.

Note : I am always prefer android studio as android development IDE , so I suggest you to install android studio.

Getting Started With a new Project :

Open Android Studio and In the Welcome to Android Studio window, click Start a new Android Studio project. Or if you have a project opened, select File > New > New Project.

Open Android studio



2. In the Create Android Project window, configure your project details :

Project Name

Package Name

Project Location

Project Configuration

3. Add an Activity to Mobile :

Here we select Empty Activity from templates as an Activity of our Android app.

Add an Activity to mobile

4. Set Target Android Device :

Here we select form factors on which your app will run on. Select Phone and Tablet and the minimum SDK level as our target devices.

Target Android Device

5. Configure Activty :

Now finally we configure the Activity i.e Activity Name and Layout Name .

Configure Activity

6. Finally Click Finish.

After some processing, Android Studio opens the IDE.

Android Studio

Now your first android project is gets started, to make this Test app we will need to customise MainActivity.java and activity_main.xml file.

First find “activity_main.xml” in the project tree and double-click it. Remember, “activity_main.xml” is the file which holds the User Interface definition. Add the following code in side the parent layout of activity_main.xml file .

<TextView android:id="@+id/txtView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />

Now the final step is to add some Java code to show a “Hello World” text on your android Test app. Find MainActivity.java and add the following code inside the “onCreate” method :

package net.technxt.testapp; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class MainActivity extends AppCompatActivity { TextView txt; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); txt = (TextView)findViewById(R.id.txtView); } }

Now we have to test it in the emulator or you can use your android device as an emulator to test your app.

Run (or click Run in the toolbar) the project/app in android device or any Emulator to test your first Test android app.

Select your Deployment Target it could be emulator or your device, and click OK.

Deployement Target

Android Studio installs the app on your connected device and starts it. You should now see “Hello World!” displayed in the app running on your device.

Share this: WhatsApp

Facebook

Twitter

Reddit

LinkedIn

