You are on page 1of 4

Creating and running your first program

Lab - 2
Step

1. Open Eclipse.

2. Select File > New > New Android Application Project to create a new android application
3. Enter Application Name, this name will be presented in the Android application market
not the name of your application.

4. Enter Project Name, this is the name of your application.


5. Enter Package Name, package name will represent the container of your code
6. Select API 13: Android 3.2 (Honeycomb) from the Minimum Required API dropdown
list. This API will

represent that all


devices running
Android 3.2
(Honeycomb) can run

your application. We
will use this API
throughout in this
course.

7. Select API 18 or the


highest API you have
available from the
Target SDK dropdown

list
8. Select API 19: Android 4.4 (KitKat) (Highest API) from the Complied With dropdown
list

9. Select Any Theme from the Theme options


10. Select Next
11. In the second screen, leave the options as it is and click next.

12. Select the foreground


icon for your application,
it should be any open like
image, clipart or text.
13. In the preview you
can view your icon how it
will be display on the
screen.
a. Mdpi for medium dot
per inch devices: 160 DPI
b. Hdpi for high dot per
inch devices: 240 DPI
c. Xdpi for extra dot per
inch devices: 340 DPI.

14. When satisfies with


your settings select
Next.

15. Check Create


Activity and select
Blank Activity
from Create
Activity panel.
16. Select Next.
17. Enter Activity
Name, Layout
Name. Activity name is the name of your Java class and Layout name is the XML layout
of your application.
18. Click Finish to create a new project based on setting you have provided earlier.
Running your application

1. Select Run > Run to lunch your


application in emulator.
2. Wait your few seconds to show
your application on emulator
screen.

Tasks: (15 marks)

• Steps for setting up first project in Android Studio


• Walk around of the different features of Android Studio when the first screen loads
• Starting the first AVD and configuring it and also running emulator
• Enabling USB Debugging on Android Phone
• Running the hello world program walk around of the basic android app code structure.

You might also like