1. Install Java6
安装jre/jdk
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
After installation using this command, it is installed in the /usr/lib/jvm/ directory by default. Taking me as an example, here is
/usr/lib/jvm/java-6-sun-1.6.0.24 directory, there is also a shortcut java-6-sun under /usr/lib/jvm/
Sometimes multiple jdks are installed, and sometimes they need to be switched between each other. This can be done with the following commands:
sudo update-alternatives --config java
sudo update-alternatives --config javac
For command line configuration, see:
Building JDK under Ubuntu
http://www.cnblogs.com/ghj1976/archive/2010/09/26/1836082.html
Ubuntu java environment variables
http://hi.baidu.com/pingfanren_lcs/blog/item/de5b9b5280c23c020df3e3fd.html
2. Install Eclipse
Open Application --- Ubuntu Software Center,
search for Eclipse, download and install
Open Application --- Programming --- Eclipse
Work folder settings, default is enough, click OK
3. Set up Eclipse
Open the Eclipse menu Help--->install new software
Select ADD
Enter Name:ADT
Location: http://dl-ssl.google.com/Android/eclipse/ (use https under Windows.)
Press OK
Then tick them all and install. Keep pressing Next to accept the agreement and it will be installed automatically.
4. Download Android SDK
Download the Android SDK and select android-sdk_r10-linux_86.tgz
In China, you can download it from the following address:
http://dl.google.com/android/android-sdk_r10-linux_x86.tgz
http://code.google.com/p/androidforchinadeveloper/downloads/list
http://www.icewalkers.com/Linux/Software/536930/Android-SDK.html
5. Set Android SDK path
After Eclipse restarts, select [windows]-----[preference]---[Android]
, click Browse, select the Android SDK path you just downloaded (needs to be decompressed)
and click Apply
Then select the Android Package to be installed in Window > Android SDK and AVD Manager. To put it simply, select all.
> Available Packages:
> Android Repository:
+ Android SDK Tools, revision 9
+ Android SDK Platform-tools, revision 2
[Install Selected]
In this way, the Android development environment on the Linux machine is completed.
References:
Install the android development environment under ubuntu10.10
http://blog.csdn.net/wangchenggggdn/archive/2011/01/20/6154188.aspx
Android SDK 2.2 development environment installation
http://www.cnmsdn.com/html/201005/1274854872ID5102.html
Set up android development environment under ubuntu
http://www.cnblogs.com/candycaicai/archive/2011/02/25/1964940.html