Http://www.bananawolf.com/html/2011/06/628.html
Recently, Android is not very popular. Our company also has related businesses. The boss told me to study it too! Of course, I am happy to learn such a hot topic. I went to the bookstore to buy an example book for Android SDK development, even if I started learning.
In this book, the installation of the development environment is not very detailed, and only the environment configuration method on windows is not available. Now let's take a look at how to install the eclipse + Android Development Environment on Ubuntu.
1. Install JDK 6
First confirm that the software source has been added, in system-system management-software source-other software, make sure that the http://archive.canonical.com/ubuntu lucid partner is selected.
sudo apt-get install sun-java6-jdk
Set system environment variables
Export java_home =/usr/lib/JVM/Java-6-Sun (based on the specific installation path) Export android_java_home = $ java_home
2. Install eclipse
Find and install in application-Ubuntu Software Center
3. Install the android SDK
Download android-sdk_r11-linux_x86.tgz from http://developer.android.com/sdk.
Decompress the package to/OPT.
Sudo tar xzvf android-sdk_r11-linux_x86.tgz-C/OPT # modify directory permissions, sudo chown-r root: Root/opt/android-sdk-linux_x86 root for your current user or sudo chmod 777/opt/android-sdk-linux_x86
Add path
sudo gedit ~/.bashrc
Enter at the end of the file
# android sdkexport PATH=${PATH}:/opt/android-sdk-linux_x86/tools
4. Install the ADT plug-in
Open the eclipse-help-install new software installed above
Work width is http://dl-ssl.google.com/Android/eclipse/
Choose to install Android development tools
If an error occurs during installation: The operation cannot be completed. See the details
Indicates that WST needs to be installed, input address http://download.eclipse.org/releases/galileo/
Select the last sub-item WST of the last item. If an error occurs during WST installation: An error occurred while installing the items
Session Context was :( profile = platformprofile, phase = org. eclipse. equinox. internal. provisional. p2.engine. phases. install, operand = NULL-> [R] Org. eclipse. ant. ui 3.4.1.v20090901 _ R351, Action = org. eclipse. equinox. internal. p2.touchpoint. eclipse. actions. installbundleaction ).
The artifact file for osgi. Bundle, org. Eclipse. Ant. UI, 3.4.1.v20090901 _ R351 was not found.
It is possible that the eclipse-PVDF or eclipse-jdt plug-in of eclipse is not installed.
sudo apt-get install eclipse-pdesudo apt-get install eclipse-jdt
5. Set SDK-HOME
In eclipse window-preferences-> Android browse select Android SDK installation directory that is/opt/android-sdk-linux_x86
Update Android SDK tools,
In eclipse-window-android SDK and AVD Manager-installed packages, select Android SDK tools, and click Update all in revision 11.
Now, the basic configuration of the eclipse + Android environment is complete.