basic android app tutorial - run hello world program

10
Android App Tutorial How to make a basic android App: Connect, Configure App on Real Android device (Smartphone etc.) and Run Hello World program with Android Studio.

Upload: navneet-goel

Post on 14-Apr-2017

136 views

Category:

Mobile


1 download

TRANSCRIPT

Page 1: Basic Android App Tutorial - Run Hello World Program

Android App TutorialHow to make a basic android App: Connect, Configure App on Real Android device (Smartphone etc.) and Run Hello World program with Android Studio.

Page 2: Basic Android App Tutorial - Run Hello World Program

I have taken reference from my blog androidtutorialpoint.com.You can read this tutorial at my blog by clicking on link in below description.

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

Just follow Next Slides:

Page 3: Basic Android App Tutorial - Run Hello World Program

Enable developer Option in Android

First we need to enable developer option on Android device.

Go to settings of the Android Device and then System Settings as shown in image:

Page 4: Basic Android App Tutorial - Run Hello World Program

2) Click on About Phone (In some devices it is About Device).Right screen will be openedimage:

Page 5: Basic Android App Tutorial - Run Hello World Program

3) For Android version higher than 4.4,developer option is hidden. In the previous image there will be a Build number.You need to hit this build number 7 times. It is common for all android devices. Now go back to settings again.You will see developer options as shown image.

Page 6: Basic Android App Tutorial - Run Hello World Program

Connect Android DeviceSelect developer options and then select USB debugging option. Connect your Android device with Android Studio through micro USB wire. Select photo transfer (PTP) option as show in image.Now open Device Monitor in Android Studio and you will be able to see deviceconnected.So we have successfully connected and configured android device. Now let’s runa Hello World App on our configured device.

Page 7: Basic Android App Tutorial - Run Hello World Program

Creating Hello World Project

Please follow following steps:

1) Open Android Studio and make a new project with name “Android Device” and company domain application.example.com (I used my company domain i.e androidtutorialpoint.com. Similarly you can use yours).

2) Click Next and choose android version Lollipop. Again Click Next and Choose Blank Activity.

Page 8: Basic Android App Tutorial - Run Hello World Program

3) Leave all things remaining same and Click Finish. Now you can see files: MainActivity.java, content_main.xml and strings.xml. If you are not able to see them then click on the left window where these files can easily be located as shown in figure below.

Page 9: Basic Android App Tutorial - Run Hello World Program

Run the code (Shift+F10) . Following image will pop up:

Page 10: Basic Android App Tutorial - Run Hello World Program

Select the device and click Ok. Boom!! Our App is working and running fine. Hello World will be shown on Android Device.

Let me know if you have any queries or comment on my blog. I would love to help you.

Reference: http://www.androidtutorialpoint.com/