How To Create a Simple Application Using Android Studio – Tutorials + Code

We will learn to start making basic Android app using Android studio, simple Android application that we will create is an application that can help us calculate the area of a rectangle. Now let’s start

1. Open Android Studio and select Start a new Android Studio Project.

welcome to Android studio

2. after point 1 then you will find the Create New Project window appears, fill in as below.

point 2

3. Click Next and check the Phone and Tablet

select the form

4. after you click Next, then select Blank Activity and would look like in this picture

add an activity to mobile

5. next Click Next, and content Activity Name and others as below.

choose option

6. Then click Finish. Then automatically displays the project that we have created.

screenshot android studio

Here is directly exposed activity_main.xml display layout. And we can immediately run. If we had simply connect to Android device to a computer through a USB port.

To add length and width input then we have to edit the file layout in this case activity_main.xml to replace the existing code in the file with the code below.

Well one studio android is that we can immediately see a preview

activity main

Once the layout is complete now let’s do the brains of this application is part of his java. Open MainActivity. java then typing the following code.

if the eclipse for application configuration file located on AndroidManifest.xml, if in Android Studio configuration is on file build.gradle (module: app)

Now let’s run our application. I suggest we have a Mobile Android so we can directly Run to Phone. Because if to Run using Emulator was slow and many wear our computer Resource. Good Luck !


No comments.

Leave a Reply