Android is a great operating system and is very famous and widely used around the world. designing apps for android is a nice job or hobby you can do because millions of devices around the world is using android, it is simple but also a little hard (if you are new into it) in the coding section of android development. what made android so famous is it’s simplicity, easy to use user interface (UI), security and open source (free to use).
here in this tutorial we will learn how to make our first android app, this app will be very basic, it opens a view (Activity) and shows your name in the view.
So let’s start.
I hope you already set up the Android Studio (Android studio is a computer software to develop android apk softwares) and it is functional. if not, you can learn how to set up android studio here in this site
Starting the tutorial
Open the android studio and select “Start a new Android studio project” (marked green)
Give our app a name and click Next
select “Phone and tablet”, and click Next
in the next screen choose “Empty Activity” Then click next
in the next screen, click finish and wait a minute until android studio finish creating the project, after creating the project, the editor will be opened
The editor
This is the editor, this is where we will be coding and editing our android apps. more about the editor later
Now in the left coloum of the editor you can see many folders (Manifest,java,res etc) .
from the folders, select “res” folder, in this folder is where the android main view layouts stored
in the res folder, you can see some other folders, select “Layout” folder and double click on the “activity_main.xml” file, it will be opened in the editor
in the editor, go to TextView and select “Hello world” and change the Hello world to “Your Name“, here i put my name “Hi, My name is zid” remember, the name must be inside the ” “.
the text that you should change is marked in red
That is it, now we need test our app on an android phone, we can also test the android app on unreal devices called “Emulators” or “virtual devices” but now let’s test with your own android phone
Testing your App
To test our new app, connect your phone to your computer with a USB cable, if you are connecting your android phone first time, you will need install driver software specific to your device
and in phone settings, you will need enable USB Debugging.
Go to settings of your device and under the developer options, you can enable USB debugging , if you can’t find developer options, you need to tap on the “Build number” around 5 times or more to enable developer options.
if still the USB debugging not found, it could be in other options of the settings.
click on the green run icon, and in the next menu select your device from the list
in the list you can see i have my lenovo android phone connected so select your device from this list and click Ok
wait a few moment until Android studio finishes building the project
and now our android App will be launched on the android device!!
Congratulations, our first android app is now launched on the device!. if you want add more functions to the app, you can find it in this site.
Thanks for the best informative post for us. Actually i am regular viewer of this site. Keep it up. Thanks from apkja