Saturday, August 27, 2016

How To Make Your First Android Application With Android Studio

How To Make Your First Android Application With Android Studio

What Is Android Studio?

Android Studio is an integrated development environment (IDE), you may develop and update android applications.

Goal Of This Post

We will be downloading the Android Studio IDE software and its compatible java SE software so that we can start building our first Hello World application using Android Studio. This small project should be very straight forward. Enjoy!

Downloading The Android Studio IDE software


To download the Android Studio software please go to the android website from the following link, https://developer.android.com/studio/index.html

Android Studio The Official IDE for Android

Download The Java SE From Oracle

The following link will link you to the Oracle website to download the Java SE. You will need this to run the Android Studio application so that we can build apps faster.
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Java SE Development Kit 8u101

Open The Android Studio Application And Create New, "Hello World" Project

After downloading and installing the Android Studio Application and Java SE Development Kit. Open the Android Studio Application. Start, "New Project" for the application and name the Application name, "Hello World". Continue after this with the default Company Domain, Package name, and Project location.

Android Studio New Project, "Hello World"
Press next make sure that the defaults are selected as, "Phone and Tablet" the Minimum SDK can be default API 15 or XX. The lower the API levels the more phones and tablets will be able to be compatible with the devices. Just be careful to not go to low or you won't have too many functionalities such as on the higher API's. Continue with the next screen and select, "Empty Activity" and next again.

On the next screen keep the Activity Name to it's default, "MainActivity" and the check box checked to Generate Layout File. Layout name can be default, "activity_main" and finally finish.

Working On The activity_Main.xml Layout File

While having the Android Studio open go to the file system on the left and click on the name, "Project." Now go to App, Res, Layout, activity_main.xml open that up.
The Android Studio File System activity_main.xml
After having opened the activity_main xml file you will be able to to do anything you like to this user interface (UI).

Lets drag on the Palette the feature, "Large Text". Drag the large text feature to the device screen. Double click on the Large Text feature and type in, "Hello World." This will put a big hello world on the device screen as shown below. You can also move it to any place you like.

Android Studio Application Mobile Device, "Hello World" Test

Running Your Application On Your An Emulator Or Android Device

To be able to run your android apk and application on an emulator or mobile device at the top you have to press the, "Run App" button or press, "F5" this will automatically run your application that you have built on an emulator.

It may ask you to create an emulator device if you do not have one already. Just pick one that best fits your needs.

Thanks.



Nickolas O'Neal is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

No comments:

Post a Comment