CSE 461: Introduction to Computer Communication Networks, Autumn 2012
  CSE Home   About Us   Search   Contact Info 
Home
Overview
Course email
Anonymous feedback
View feedback
Course wiki
Home Virtual Machines
Homework Turnin
Class GoPost Forum
Gradebook
Schedule
Hw/Project List
   

Eclipse + Android Setup


1. Choose a Build Platform

Every individual should set up a build platform. It's not a team platform, it's the platform you're going to work on.

The officially supported platform is Linux. The tools should work on Windows and OS X as well, but we won't be testing any course software there.

Setting up your build environment requires the work below. It's not something you're going to want to do too many times, so it makes sense to set up now the system that you think will be your primary platform for 461 work.

I advise against the use of a shared machine, like attu, unless you really have no good alternative. There are three reasons:
  1. The Android emulator runs slowly unless it has adequate processor and memory resources. If a lot of people are running the emulator at once, they're likely to experience bad performance, as may everyone else on the machine.
  2. I've seen some indication that if someone is running an emulator when you try to start one, you'll run into problems. It looks like the problems can be addressed, but it's an additional complication.
  3. You can't plug the physical phone into the shared machine, so can't run on the phone. (There may be a way, but I don't know how.)
Note that lab workstations are not shared machines, in the sense we mean here.

2. Eclipse + Android Setup

On Non-CSE Machines

Follow the instructions that start here. Unless they're already installed on your development system, you will end up having to install:

  1. Eclipse JEE
  2. Google Plugin for Eclipse 4.2
    Select the Developer Tools and the Google Plugin for Eclipse.
  3. The Android SDK.
  4. When you've done that, you'll have the Android 4.1 SDK installed. Our phones run only Android 2.3.5, so you need to install an SDK that can run on that release.
    • In Eclipse, select the Window menu, then Android SDK Manager.
    • Scroll down until you see Android 2.3.3 (API 10), and expand it by clicking on the arrow on the left.
    • Check the boxes for SDK Platform and Samples for SDK.
    • Click on the Install button on the lower right.
    • A new dialog appears. Click to start the component installation.

On the CSE Home Linux VM

The CSE Home Linux Virtual Machine has Eclipse already installed. You should follow the instructions above, for non-CSE machines, except that you can skip step 1.

On Real CSE Linux Machines

"Real CSE Linux Machines" include lab workstations and the attu's. For those machines, Eclipse is already installed and the Android SDK already downloaded. That means that you have to perform only step 2 of the instructions above you'll be ready to go, I think.

The unknown piece is this: when you've completed step 2, I'm not sure whether or not Eclipse will know where the Android SDK files are. In Eclipse, select the Window menu then Android SDK Manager. At the top you'll an SDK Path text box. It should say /cse/courses/cse461/android-sdks. If so, I think you're done. If not, try to set it to that file path. You might be able to do it there, or you might need a different dialog box: try the Windows menu, then Preferences, then click on Android. If we're lucky, there will be a text box on the right that lets you set the path to the Android SDK.

(I've tried to simulate the "never ran Eclipse + Android before" situation on attu, by deleting all Eclipse related files I could find. Doing that, everything works (after performing Step 2) without my setting the SDK path. Whatever you find, you should be able to deal with it without much difficulty - we're just trying to tell the Eclipse Android plugins where the SDK files are.)

3. Verifying the Setup

The easiest way to verify that things are okay is to proceed on to installing the Project 1 software.


Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to zahorjan at cs.washington.edu]