Eclipse & Android SDK Installation for Windows Current 07/28/2011 1. Install Java SDK (If not already installed). (I believe the labs currently have some version 1.6.x. Latest release available is 1.6.26) To download the standard sdk, Go to : http://www.oracle.com/technetwork/java/javase/downloads/index.html Click the [Java Download] - Java Platform (JDK) This will be the left most version listed. This will take you to a list of OS versions. First click on license acceptance. Then, look for Windows x86, Click on download for this one. Currently this is jdk-6u26-windows-i586.exe and is an installer. Run downloaded installer and follow installation instructions. It may be best to install to the default location and use the default name. 2. Download Helios version of Eclipse... Note : The Eclipse and Android should be installed by the "user" who will be using it, even if some install steps have to be elevated to administrator. When I attempted to access Eclipse from a different user account in Windows 7, the android plugin was not available. In Windows 7, some of the configuration information is stored in "Documents and Settings" under the user's folder. To download Eclipse Helios, go to : http://www.eclipse.org/downloads/ Choose the "Eclipse Classic 3.7" version. Do not install the latest release, "Indigo", because it does work with the Android SDK at this time. Instead, install the “Helios” version. To find Helios : Click on "Other Downloads" and then scroll down to "Latest Releases" Choose Build Name 3.6.2, Click on the release number to get to next web page. When the "Release Build: 3.6.2" page comes up. Scroll down to the "Eclipse SDK" table and look for "Windows(Supported Versions)" Click on the (http) link in the Download column next to that entry. This will link to a page where the currently preferred mirror displayed at the top and alternative mirrors listed below. Click on the preferred mirror site. This should download or open eclipse-SDK-3.6.2-win32.zip. Extract the contents of the downloaded zip file, the eclipse directory, to a desired location such as "Program Files" If desired, create a shortcut to the eclipse.exe file in this directory once it is in place. 3. Download and install the Android SDK… To download Android SDK, go to : http://developer.android.com/sdk/index.html In the Platform table, look for the Windows package : installer_r12-windows.exe Click on it to download and save. To Install : Run installer (may have to run as administrator if not installing in user's directory) Additional help for installing Android can be found at : http://developer.android.com/sdk/installing.html On "Welcome to the Android SDK Tools Setup Wizard" screen : Click [Next] The installer will look for a Java installation. It may report that it cannot find it. The solution is to press the dialog’s [Back] button and then immediately [Next] again. If this does not resolve missing Java, check that the CLASSPATH is set in the system's environmental variables. On "Choose Install Location" dialog, specify install location. Click [Next] On "Choose Start Menu Location" dialog, specify location. Click [Install] SDK will install, when "Installation Complete" dialog shows "Completed", Click [Next] On "Completing Android SDK Tools Setup Wizard" dialog, Click [Finished] This will bring up the "Android SDK and AVD Manager" and provide a dialog to "Choose Packages to Install" Click [Cancel] - default configuration includes several packages we are not interested in. In Android SDK and AVD Manager : Click on "Available packages" To the right, in "Packages available for download" Click on the ">" next to "Android Repository" to expand. Currently the list looks like : Android SDK Platform-tools, revision 6 Documantion for Android SDK, API 12, revision 1 SDK Platform Android 3.2 API 13, revision 1 SDK Platform Android 3.1 API 12, revision 2 SDK Platform Android 3.0 API 11, revision 1 SDK Platform Android 2.3.3 API 10, revision 1 SDK Platform Android 2.3.1 API 9, revision 2 SDK Platform Android 2.2 API 8, revision 2 SDK Platform Android 2.1 API 7, revision 2 ... (additional packages that we are not interested in) When the list expands and displays, select all Platforms that are SDK 2.1 and up. Make sure the following are also checked : Android SDK Platform-tools, revision 6 Documantion for Android SDK, API 12, revision 1 Reject older SDKs and addons. Click [Install Selected] Another dialog box will appear listing chosen packages. (x)Accept - accept listed Click [Install] This may take several minutes. At one or more points, there will be a message : "A package that depends on ADB has been updated. Do you want to restart ADB now?" Click [Yes] There may not be anything obvious that happens when you click [Yes] At this point, close the ADB. 4.Run Eclipse and Install Android Plugin Several general purpose plugins need to be installed first. Start Eclipse. When started, Eclipse allows you to "Select a Workspace" Set to preferred location. In the labs, you want H:\ Do NOT check the "Use this as the default and do not ask again" prompt. Click on [Ok] Once workspace is accepted, "Welcome" screen may show. Close Welcome screen by clicking [X] on tab. This will probably not be displayed again. Once Eclipse is up, install the plugins required to use Android Install helios plugin Help->Install New Softare Click [Add] - to the right of the "Work with" text box near the top. In the "Name:" text box, enter helios In the "Location:" text box, enter http://download.eclipse.org/releases/helios Click [Ok] (In this case, we are only providing the location to Eclipse to search on its own if needed, don't select any of the packages listed.) Install google plugins. Help->Install New Softare Click [Add] In the "Name:" text box, enter Google In the "Location:" text box, enter http://dl.google.com/eclipse/plugin/3.6 Click [Ok] In the main window, you should see 3 packages Check "Google Plugin for Eclipse (required)" Check "SDKs" Click [Next] at teh bottome of the Install dialog. (Packages will be fetched) Click [Next] Accept License and click [Finish] (Packages will be installed - may take several minutes.) You may get a warning about "Unsigned Contents", click [OK] After packages are installed, Eclipse will want to restart, allow it. Install Android plugin Help->Install New Softare Click [Add] Name : android Location : https://dl-ssl.google.com/android/eclipse (note https) Click [Ok] You should now see "Developer Tools" in main window. Click on check box to select all elements. Click [Next] Click [Next] Accept license and click [Finish] You may be warned about unsigned contents, Select [OK] When installed, Eclipse will want to restart. Restart. Close Eclipse. 5. Configure the Android Development Tools in the Android SDK. We would like to make the Virtual Device configuration a part of the class assignment, but this requires that an environmental variable be set to the desired path. In the labs, this should probably be h:\ [computer]->[Properties]->[Advanced system settings] [Environmental Variables] Add the variable : Variable name: ANDROID_SDK_HOME Variable value: H:\ Alternatively, it may be possible to set up a batch file that sets the environmental variable and then invokes Eclipse. Next, start Eclipse and tell it where the Android SDK has been installed. Make sure the environmental variable has been set first, Eclipse with use that location to store configuration information. Go to : [Windows]->[Preferences] Make sure Android on the left is highlighted. On the right, In "SDK Location:", enter the location of the android-sdk folder. i.e C:\Program Files (x86)\Android\android-sdk Click [OK] At some point during the configuration of the sdk, you may also get : "Thanks for using the Android SDK!" dialog with an option to opt out of sending usage statistics to Google. Uncheck and [Proceed] If you find that the dialog does not respond, it is because another dialog is actually waiting for the response and this dialog is sitting on top of it. Use the taskbar to find the active dialog and complete it.o Once this is done, the Android dialog should respond to the mouse. Start the SDK and AVD Manager from Eclipse. 6. The Emulator and AVD's (Android Virtual Devices) To run an Android app on the software emulator, you must configure one or more AVD's. Start the SDK and AVD manager (5th toolbar icon from the left - a little robot hat with a arrow inside a rectangle below it). Click [New] to configure an AVD. Complete the form - try this to begin: Name: MyAVD Target: Android 2.2 - API Level 8 (or preferred Android version ) SD Card/Size: 100 MB Skin: WVGA800 Hardware: accept the defaults Now you should be able to run a completed Android App on the emulator from within Eclipse.