installation steps for android development

7
Installation steps for Android 1. Install Android SDK (android-sdk_r04-windows.zip) at “C:\ android-sdk-windows” (e.g.) from the link http://developer.android.com . 2. Also download and install android-ndk-1.5_r1-windows.zip at “C:\ android-ndk” (e.g) from the link http://developer.android.com/sdk/ndk/1.5_r1/index.html . 3. Download Eclipse at “C:\Eclipse” (e.g.). To work with C/C++ on Eclipse, download “eclipse-cpp-galileo-SR1-win32”. For its installation unzip the folder and then use the eclipse.exe directly. Eclipse can be downloaded from http://www.eclipse.org/downloads/ . 4. Install msjavx86.exe and JDK / JRE from http://java.sun.com/javase/downloads/index.jsp at the default location. 5. Install ADT (Android Development Tools) by the following steps: 6. Start Eclipse, then select Help > Install New Software. 7. In the Available Software dialog, click Add.... 8. In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field. In the "Location" field, enter this URL: https://dl-ssl.google.com/android/eclipse/ Note: If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).Click OK. 9. Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next. 10. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish. 11. Restart Eclipse.

Upload: pooja-arora

Post on 27-Jun-2015

151 views

Category:

Documents


1 download

DESCRIPTION

This document will help you in setting the environment for developing applications in Android. Steps are also given for running the sample application.

TRANSCRIPT

Page 1: Installation Steps for Android Development

Installation steps for Android

1. Install Android SDK (android-sdk_r04-windows.zip) at “C:\ android-sdk-windows” (e.g.) from the link http://developer.android.com.

2. Also download and install android-ndk-1.5_r1-windows.zip at “C:\android-ndk” (e.g) from the link http://developer.android.com/sdk/ndk/1.5_r1/index.html.

3. Download Eclipse at “C:\Eclipse” (e.g.). To work with C/C++ on Eclipse, download “eclipse-cpp-galileo-SR1-win32”. For its installation unzip the folder and then use the eclipse.exe directly. Eclipse can be downloaded from http://www.eclipse.org/downloads/.

4. Install msjavx86.exe and JDK / JRE from http://java.sun.com/javase/downloads/index.jsp at the default location.

5. Install ADT (Android Development Tools) by the following steps:

6. Start Eclipse, then select Help > Install New Software. 7. In the Available Software dialog, click Add....8. In the Add Site dialog that appears, enter a name for the remote site (for example, "Android

Plugin") in the "Name" field.

In the "Location" field, enter this URL:

https://dl-ssl.google.com/android/eclipse/

Note: If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).Click OK.

9. Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.

10. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.

11. Restart Eclipse. 12. Now we have to modify the Eclipse preferences to point to the Android SDK directory.13. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse >

Preferences).14. Select Android from the left panel. 15. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK

directory. 16. Click Apply, then OK.17. After installing SDK, make an environment variable (User variable) named as “ANDROID_SWT”

and set its value to “C:\android-sdk-windows\tools\lib\x86”. (Here, we are assuming that we are installing the android SDK at C:\ android-sdk-windows.)

18. Make another environment variable (User type) named as “ANDROID_NDK_ROOT” and set its value to “/cygdrive/c/android-ndk”.

19. In the “path” environment variable, add “C:\android-sdk-windows;C:\cygwin\bin;

Page 2: Installation Steps for Android Development

C:\eclipse\jre\bin\javaw.exe;”20. Install Cygwin at “C:\Cygwin”. While installing Cygwin, it will ask for packages to install, from

there press “View” tab, search for “make” and “gcc” packages and include them by activating. (Here, rather than installing ‘GNU Make’ independently, we are installing them from Cygwin itself.)

21. Now to start working with NDK, we have to build a shell file “host-setup.sh” present in NDK. For this, the steps are:

22. Run Cygwin.23. Type “cd C:” and press Enter.24. Type “android-ndk” (name of your NDK folder on C:\), press Enter.25. Type “build host-setup.sh” and then press Enter.

Now to run a sample project (present in C:\android-ndk\apps), the steps are:

1. Open eclipse.2. File>>New>>Android>>Android Project.3. Choose the option “Create project from existing source”, browse the location and set it as

“C:\android-ndk\apps\hello-jni\project”. Now the Project Name, Application Name and SDk version will automatically be set like shown below:

Page 3: Installation Steps for Android Development

4. Press “Next”, then press “Finish”.5. In the Package Explorer Window, select “Project>>Properties>>Java Build Path>>Google APIs

[Android 1.5]” like shown below:

6. Now build the project by “Project>> Build Project.”7. After successful build, run the application.

NOTE: While creating a new project (of our own), we must provide it an AVD (Android Virtual device). So, to create and set an AVD, the steps are given below.

1. Open the AVD Manager by clicking on the phone button (black color) present in the tool window of Eclipse.

2. Following kind of window will be opened.

Page 4: Installation Steps for Android Development
Page 5: Installation Steps for Android Development

3. Press “New”, give a name of AVD, set the TARGET and then press on “Create AVD” like shown below.

Page 6: Installation Steps for Android Development

4. Now press on “Start” like shown below

5. Now just “Launch” the AVD and the application will be executed.