Let’s start with setting up with the development environment for Android app development and make our first “Hello World” app.
1. Download and Install Eclipse IDE
- Download the Android SDK from https://developer.android.com/sdk/index.html
- Extract the zip file.
2. Download and Install JDK and Java SE Platform
- Download and Install JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
- Download and install Java SE from http://www.oracle.com/technetwork/java/javase/downloads/index.html
3. Start Eclipse
- Go to the directory where you have unzipped the adt bundle and then go to eclipse folder and start eclipse.
4. Install any updates from the SDK manager (may skip this at first)
- In eclipse go to Window > Android SDK Manger.
- Check and install any update for the environment you want.
5. Create your first Android App
- Go to File > New > Android Application Project.
- Enter your Application’s Name (Remember the first letter of the name must be capital).
- Select Minimum supported SDK for your app and also the Target SDK
- Select a theme if you want.
- Click Next.
6. Select a path to store the project
- Select a custom path, if you want for your app.
- Click Next.
7. Select an Icon for the app
- You may want to select your own icon in this dialog box or use the default one.
- Other icon properties can also be fiddled with.
- When you are done click Next.
8. Select an Activity type
- Select an activity type such as blank, empty and others.
- For now select an Empty Activity.
- Click Next.
9. Choose a name for the Main Activity
- Give a name you like to the main activity for the app.
- Click Finish.
10. Launch your first app
- To launch your first app you can either use your physical android device via USB or use the emulator provided by the SDK.
- To run the app on physical device just connect the device and make sure that all its drives are installed correctly. Then press CTRL + F11 and select run as an Android Application.
- To run on an emulator setup an AVD (Android Virtual Device) by going to Window > Android Virtual Device Manger. Then click on Create and fill in the dialog box for the properties on the AVD. Now select the AVD and click on Start. And to run the app press CTRL + F11.
- If there are no errors (which won’t be the case), then the app will launch either on the device you connected or on an AVD.
0 comments:
Post a Comment