Open eclipse, and from the menu select File -> New -> Android Project
The New Android Project window opens.
Now fill in the details for Project name, Application name, Package name, Create Activity and Min SDK Version. Also select the Build Target as Android 2.2.
Project name is the name of the new android project. It can be "HelloAndroid".
Application name is the name of the new app - name shown in the title bar. It can be "Hello, Android"
Package name should be unique across the android system. A name like "com.my_name.helloandroid" can be used, were my_name is the name of the developer. Here, the name used is com.android.HelloAndroid.
Create Activity is the name of the default activity. Activity is similar to a screen/window in windows.
Min SDK Version is the minimum version of sdk required for the app to run. With android sdk 2.2, this version is 8.
Click on the finish button, and the ADK pluggin will create the app for you.
Click on the Run button or Run -> Run from menu. This will start the android emulator (which will take some time depending on your system configuration), install the new app into the device and run the app. The output of the HelloAndroid app will be
Now, from where did the comments "Hello World, HelloAndroid" come?
If you check the file strings.xml in ./res/values folder you'll get the answer. This was created by ADT pluggin that we used!!!
A complete description of the "HelloAndroid" app will be provided in the next few blog posts. Before that lets see what we have done to create the app:
- Create a new android project in eclipse from File -> New -> Android Project
- Fill in the details for Project name, Application name, Package name, Create Activity and Min SDK Version in the New Android Project window
- Save the project and run
- Wait till the android emulator starts and the application is run
No comments:
Post a Comment