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.

Downloading and Installing the Android Plugin for Eclipse

Posted by admin April - 17 - 2010 - Saturday ADD COMMENTS

The first step in setting up the Android SDK within the Eclipse development environment is to download and install the Android plugin for Eclipse. Both tasks of downloading and installing the plugin can be performed at the same time, and are relatively easy to do:

1. Open the Eclipse application. You will download the Android plugin for Eclipse from within the Eclipse IDE.

2. Choose Help | Software Updates | Find and Install.


3. In the Install/Update window, which allows you to begin the process of downloading and installing any of the plugins that are available to you for Eclipse, click the Search for New Features to Install radio button and then click  Next.


4. The Update Sites to Visit page of the Install window, shown next, lists all the default websites used for obtaining Eclipse plugins. However, the plugin you want, Android for Eclipse, is not available from the default sites. To download the Android plugin, you must tell Eclipse where to look for it, so click the New Remote Site button.

5. In the New Update Site dialog box, shown next, you must enter two pieces of 5.information to continue: a name for your new site, and its associated URL. The name is only for display purposes and does not affect the downloading of the plugin. In the Name field, enter Android Plugin. In the URL field, enter the URL from which Eclipse will obtain information about the plugins that are available:
https://dl-ssl.google.com/android/eclipse/ . Click OK.


NOTE
The name for your site can be anything you want, as long as it will help you identify what the link is. Feel free to use something other than Android Plugin.

6.A new site named Android Plugin should now be in your list of available sites:

At this point Eclipse has not yet looked for the plugin; this is just a list of paths that you can tell Eclipse to check when looking for new plugins to install.

7. Check the check box next to Android Plugin and then click Finish. Eclipse searches the URL associated with the Android Plugin site for any available plugins.

8. On the Search Results page of the Updates window, select the Android Plugin and then click Finish.

9. On the Feature License page of the Install window, shown next, accept the licensing agreement for the Android Development Tools and click Next.


NOTE
Keep in mind that all Eclipse plugins are installed to the %installpath%/eclipse/plugins directory. This information will help you if you need to locate the files that make up the Android plugin.
10. Eclipse downloads the Android plugin. At the time of this writing, the plugin version is 10. 0.4.0.200802081635. On the final plugin installation page, Feature Verification, click Install All to complete the installation of the Android plugin.

With the Android plugin installed, the last step you have to perform is to configure the plugin.