You could use eclipse to program an android app because android is essentially Java based, however, I suggest you use Android Studio as it is now (since 2013) the official integrated development environment for the android platform.
I will be using android studio for the tutorial and screen shots.
To get Android Studio go here and go through the installation process.
If you are interested on getting more familiar with Android Studio before following my tutorial, go here.
Now that you have android studio loaded on to your machine, lets start our new project.
- Open android studio and select start a new Android Studio project.
- Choose an application name. I used the letters WBP for Wanna Be Programmer, you could put whatever you what as a name.
- Company Domain. You could put anything you want as long as its unique. This will be used by Android Studio to generate a unique package name so that you could publish your app on Google Play.
- Project location. Pick a spot on your computer where the files for your project will be stored and click next.
- The target Android Devices screen is displayed. Check Phone and Tablet and choose the minimum API level that you want to target with your app. For this app I chose API 14. Click Next.
- The Add an Activity to Mobile screen is displayed. Choose empty Activity and click next.
- Customize the Activity screen is displayed. Change nothing and click finish.
- The project will be created and you will have a basic “Hello World” app. You will see 2 opened tabs. activity_main.xml which basically is the xml code that makes up the views (design and widgets displayed on the phones screen) and the tab MainActivity where the Java code is entered to control the flow of the app.
- Now you could run the app to see what it looks like. To run the app, press (Shift + F10) or press on the green arrow shaped like a triangle.