How To Create Android App Using Android Studio (Complete Guides)

How to create Android App using Android Studio (Complete Guides). Hi guys today I would like to share a tutorial on how to create Android app using Android Studio.

Surely you have fully aware that currently Android Studio had been ordained to be the most recommended IDE officially by Google to help users creating an Android app.

How To Create Android App Using Android Studio (Complete Guides)

Firstly before we start this tutorial, make sure you have already downloaded all the needed files such as JDK, Android Studio and Android SDK -- they are needed to start developing Android applications.

As already become custom that the first app we are about to create using Android Studio is Hello World app. And I assume you own an Android smartphone and tablet, so we can directly run this app on the Android smartphone or tablet, without using emulator.

Download Android Studio from this page.

How to create Android app using Android Studio

On this tutorial we will be creating an Android app namely Hello World.

Step 1 -- Now run the Android Studio .exe file. On the Menu Bar clik on File -> New Project. See the image as reference.

How To Create Android Hello World

There is something you should know, Project on Android Studio is similar like Workspace on Eclipse. While Module on Android Studio is similar as Project on Eclipse. That means in one single Project on Android Studio can contain many Module, like Workspace on Eclipse can be filled with many Project.

Step 2 -- Now name your Project, and the domain name will be converted to be package name. You can choose the folder location to save this project. Or just fill the information similar like in the picture below.

Name Project App On Android Studio

Step 3 -- You can click Next to continue.

Step 4 -- On the next page you will be told to select the minimum SDK to be used, just choose SDK Ice Cream Sandwich (Android 4.0.3) because Gingerbread SDK is rarely be used now days.

The availability of SDK kind appear on the list compatible with any SDK you have downloaded. Android SDK will automatically present device that support the chosen SDK, for example the Android ICS SDK support almost 87.9% devices. That means your application will be massively used. Don't forget to click on Next button.

Choose Android SDK On Android Studio

On the next page you need to choose Activity type to be displayed on your upcoming Android application. Android Studio gives various template type for each Activity, such as FragmenActivity, MapActivity, FullScreen and so on.

Step 5 -- As for this tutorial purpose let's just choose BlankActivity. And then click on Next button.

Choose BlankActivity On Android Studio App

Step 6 -- On this step you are required to give your Activity name, just fill the Activity Name column, and Android Studio will automatically generate the name for Layout and other things.

Name Activity Project On Android Studio

Step 7 -- Once you have filled all the forms, just click on Finish.

Step 8 -- After you underwent all the above steps, now you will enter to the main page of the Android Studio, see the following image.

Android Studio Main Page

From the above picture we can see the layout of the app we are creating appears on the center of the page. On the left side is the project structure of the Android app we are creating.

On the Android Studio, application structure is divided into a few elements like below.

Android Studio Project Activity
From the left side picture, we can see the Android application structure has root in the folder app. The app is actually the module name from the HelloWorld app we are creating.

We can also the Android application in Android Studio has the three main folders, which are manifest, java and res. It's not too different from the Eclipse structure.

For detail information can be learned bellow.
  • manifest: contains AndroidManifest.xml file.
  • java: contains Android app source code we are creating in the form of .java file. For you to know that there are two folders there which are androidTest and main, source code we use is in the androidTest folder.
  • res: then res folder contains source files, such as layout, drawable and etc. For layout file and other files, Android is using .xml file.
  • Actually there are another folders, such as assests, libs and etc. But because those folders are not used in this project, so they are not shown.

Now running the app

Run Android App From Android Studio
Now we can run the Android application we just created. For opening the app -- firstly select the module name you wish to run -- and then simply press Shift +F10, or by clicking the green arrow button on the toolbar located on the top side of Android Studio.

When you click the green button, wait for a few moment then your created Android app will appear on your Android smartphones, tablets and feature phone.

Result Of Android App Created Using Android Studio

Congratulation guys for your first attempt making your first Android application using Android Studio utility. Don't forget to keep following this blog for the upcoming tutorials relating this topic.

Tidak ada komentar:

Posting Komentar

How To Create Database SQLite (CRUD SQLite Android)

Today is the tutorial to create inventory application for Android. This app will be using SQLite database and MVC paradigm, so make sure y...