I have started learning Android. In the below post I have posted in step by steps to create your first android App. It will be interesting to create and use the app you developed. Sorry to trouble you with my poor english. This is my first post. I am very happy for that.I love to do coding. We can learn and improve our self from what we love.
Download Source Code from GitHub.
Steps to Create Simple Android Project :
Step 1 :
Download Latest ADT (Android Development Tool) ZIP from Android Developer Tool.
Step 2 :
Downloaded ZIP File contains Eclipse and SDK.
Step 3 :
In the Eclipse folder, for Mac users will find Eclipse.app ,while the Windows user will find Eclipse.exe. Open the Eclipse. Select the workspace to work, then click ok button.
Step 4 :
To Create First Project : File -> Android Application Project. In Next Window, You have to give your Application Name, Project Name(To show your project in eclipse). Package Name is unique across all the package installed on your mobile.
Step 5:
Next we want to select the Minimum & Target SDK version. I have selected Minimum SDK version API 8 (for Least Device Capability). Target SDK version API 18 (Latest Device Capability).
Step 6 :
Click on the Next button. You will get below screen. Don't change any thing in this screen now. Just click Next again.
Step 7 :
Next you will get below screen. In that screen creating launch icon for your project (This Icon will appear in your emulator and Device). In this example, I have changed Shape to Circle and Foreground Scaling to Center.
Download Source Code from GitHub.
Steps to Create Simple Android Project :
Step 1 :
Download Latest ADT (Android Development Tool) ZIP from Android Developer Tool.
Step 2 :
Downloaded ZIP File contains Eclipse and SDK.
Step 3 :
In the Eclipse folder, for Mac users will find Eclipse.app ,while the Windows user will find Eclipse.exe. Open the Eclipse. Select the workspace to work, then click ok button.
Step 4 :
To Create First Project : File -> Android Application Project. In Next Window, You have to give your Application Name, Project Name(To show your project in eclipse). Package Name is unique across all the package installed on your mobile.
Step 5:
Next we want to select the Minimum & Target SDK version. I have selected Minimum SDK version API 8 (for Least Device Capability). Target SDK version API 18 (Latest Device Capability).
Step 6 :
Click on the Next button. You will get below screen. Don't change any thing in this screen now. Just click Next again.
Step 7 :
Next you will get below screen. In that screen creating launch icon for your project (This Icon will appear in your emulator and Device). In this example, I have changed Shape to Circle and Foreground Scaling to Center.
Step 8 :
Next you will get below screen. Now just click Next Button.
Step 9 :
Next you will get below screen. This is final screen to create your android project. Just click on the Finish button.
Step 10 :
- Expand your project will find res/ folder. Inside res/ folder you will find folder called layout/. Our Main activity xml is inside layout/ folder.
- Just open the activity_main.xml. You will find the Hello World! text.
Step 11 :
On click on the activity_main.xml tab,you find the xml tags. Inside the RelativeLayout you will find TextView.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
Step 12 :
Ctrl+click(Windows users) / cmd +click(mac users) on the @string/hello_world. It will open the string.xml.
String.xml file :
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">SampleAPP</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
</resources>
Step 13 :
Change text Hello world! to Welcome to my first Android App!.
Modified String.xml file :
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">SampleAPP</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Welcome to my first Android App!</string>
</resources>
Step 14 :
To run the application in Emulator, Right click on the project ->Run As -> Android Application.
Step 15 :
It will pop up the Android Device Chooser window. Select Launch a new android virtual device option.Then select the device to run the application. If you don't have Android Virtual Device, Click here to see how to create AVD.
Step 16 :
Now your application run in Android Emulator.









No comments:
Post a Comment