Android code , Android Phone, Android Developers

Android code , Android Phone, Android Developers and New Google Android Technologies

Configuring the Android Plugin for Eclipse

Posted by admin April - 28 - 2010 - Wednesday ADD COMMENTS


After installing the Android plugin for Eclipse, Eclipse should have prompted you to restart the application. If it did not prompt you, restart Eclipse now. Restarting Eclipse will ensure that the program has a chance to reinitialize with the plugin installed. It is
important to make sure configuration steps like this are followed in order to reduce the chance of misconfigurations.
The Android plugin for Eclipse is configured from the Preferences window of Eclipse.

Proceed as follows:
1. From the main Eclipse window, choose Window | Preferences.
2. In the Preferences window, shown next, select Android in the menu on the left. On the right side of the window, click Browse, find the location of the Android SDK on your hard drive, and enter it in the SDK Location field. Eclipse needs this information to be able to access all the tools that are supplied with Android, such as the emulator.


3. Check the Automatically Sync Projects to Current SDK check box and then
click Apply.

NOTE
The Android plugin for Windows is shipped in a zip file that contains a directory with a very long directory name: android-sdk_m5-rc14-win32. It may help you in future chapters, especially when command-line programming, to rename this directory to something more manageable. You may also want to extract the SDK to the Program Files directory.
4. The final step in setting up the Android SDK is to put it into your PATH statement. If you are using a Microsoft Windows machine, right-click Computer (or My Computer, depending on your version of Windows) and select Properties to open the System Properties dialog box. Click the Advanced tab.
5. Click Environment Variables to display the window of the same name, shown in the following illustration. This is where you can edit your PATH statement.

6. Under System Variables, find the variable PATH and double-click it.
7. In the Edit System Variable dialog box, shown next, add the location of your Android SDK—separated from the existing paths by a semicolon—and click OK to apply your changes, and click OK again in the Environment Variables window.

The Android SDK, Eclipse, and the Android plugin for Eclipse are now fully configured and ready for development. In the next chapter, you will explore the Android SDK, and learn about its features. The Android SDK contains many tools to help you develop full-featured cell phone applications.