Download and install JDK in Ubuntu Linux
Ubuntu Linux is similar to radhat Linux. First of all, download JDK 1.6 from the official website:
You must accept the to download this software.
Select accept as the accept license agreement. Linux x86-RPM installer76.93 MB
Jdk-6u26-linux-i586-rpm.binLinux x86-self extracting installer81.20 MBjdk-6u26-linux-i586.bin note select the corresponding version,Rpm supports RedHat instead of ubuntu, so we need to download the following one.I initially choseRpmVersion, but there is nothing to do with installing the RedHat JDK together. After the download is complete, you do not need to decompress the file but install it directly! Run the CD command to enter the JDK directory and then: sudo
./Confirm the file name and enter the administrator password.
In case of an error, switch to the root user, Su root, and then run the installation command.
After successful installation, the corresponding directory of JDK 1.6 will be generated under the same directory (that is, the folder in which JDK will be released after you download JDK to that folder), that is, the JDK installation directory.
The rest is to configure the JDK environment variables. You can use the VI Editor:
Run the CD command to enter the/etc directory sudo VI profile and run the Edit profile file command.
Add the following content before umas k022 in profile:
Export java_home =/home/admin888/download/jdk1.6.0 _ 26 ==>=/ home/admin888/soft/jdk1.6.0 _ 26 is the path where my JDK is located, just change your own.
Export jre_home =/home/admin888/download/jdk1.6.0 _ 26/JRE
Export Path = $ path:/home/admin888/download/jdk1.6.0 _ 26/bin
Export classpath =./:/home/admin888/download/jdk1.6.0 _ 26/JRE/lib
Save and quit, restart your computer
/// // SDK //////////////////
SDK download path: http://developer.android.com/sdk/index.html#download
1. DownloadAndroid SDK
As follows:
Http://dl.google.com/Android/Android-SDK-Windows-1.5_r2.zip
Http://dl.google.com/Android/Android-SDK-Linux_X86-1.5_r2.zip
After the download is complete
After decompression, go to tools and run Android. In installed packages, you can upgrade the AVD manager.
Modify the system search path, which can be written in. bashrc, (export path =$ {path}:/root/Android-SDK-Linux_ 86/tools). I decompress this package to the root directory. You can modify this path for different users.
In available packages, you can selectSDK, Including 2.2, 2.1, 1.6, and documentation for AndroidSDK. It is strongly recommended that you have an entry-level manual.
Install JDK, I installed a jdk-6u21-LinuxI586-rpm.bin
Install Eclipse: eclipse-SDK-3.6-Linux-Gtk.tar.gz
Download the WPT package, and download the downloaded files. Otherwise, the following steps may fail. Restart.
Install eclipse Android plug-in: Help-> install new software-> Add-> location-> https://dl-ssl.google.com/android/eclipse/
-> Select all-> next. Wait for the download and installation. If it fails, you may need to restart it.
In eclipse windows, you can see "android
SDKAnd AVD manager ", even if the installation is successful.
SelectSDKTo see which one you are using in step 1, I use 4th.
Go to Android-SD-Linux_ 86/doc中, open index.html to see how to write Hello world.
///// // Supplement ///////////////////////// /////////
I tried to download the adroid SDK for Android development in Linux over the past few days. However, because the website of the android SDK (ADT) is blocked, I cannot install it directly in install new software of Eclipse, after a few twists and turns, I finally installed the adroid SDK in Linux. Here I will share with you that I hope it will be useful to some people and I will not take any detours.
- Download the latest eclipse 3.6.2 (note, preferably javaee). Click here to download it.
- Download ADT-0.9.9 at http://dl-ssl.google.com/android/adt-0.9.zip. You can directly enter idea in eclipse.
Error.
- Go to eclipse-> help-> install software to enter the install panel, click Add, and click archive to install the downloaded ADT.
- Download the android SDK for linux package at http://dl.google.com/android/android-sdk_r10-linux_x86.tgz.
- The downloaded SDK is not complete. You need to download some other files, such as API and platforms, which can be directly updated in SDK manager, the failed to fetch URL is displayed.
Http://dl-ssl.google.com/android/repository/repository.xml. Some methods on the Internet are to set up the proxy server, but I am useless here, so I have to leave.
- Go to idea (we recommend thunder. Otherwise, the speed is close to 20 K, and the 1g SDK is enough for you ). The following is a list of specific files (the following folders cannot be created manually ):
- Each API version, directly decompress to add-ons (this folder is obtained after the above android-sdk_r10-linux_x86.tgz is decompressed ):
Https://dl-ssl.google.com/android/repository/google_apis-8_r02.zip
Https://dl-ssl.google.com/android/repository/google_apis-7_r01.zip
Https://dl-ssl.google.com/android/repository/google_apis-6_r01.zip
Https://dl-ssl.google.com/android/repository/google_apis-5_r01.zip
Https://dl-ssl.google.com/android/repository/google_apis-4_r02.zip
Https://dl-ssl.google.com/android/repository/google_apis-3-r03.zip
- For each platforms version, I have only two versions and decompress them to platforms:
Https://dl-ssl.google.com/android/repository/android-2.1_r02-linux.zip
Https://dl-ssl.google.com/android/repository/android-2.2_r02-linux.zip
- Extract platform-tools and tools to the corresponding folder:
Https://dl-ssl.google.com/android/repository/platform-tools_r03-linux.zip
Https://dl-ssl.google.com/android/repository/tools_r10-linux.zip
- Decompress docs, samples, and market_licensing to the corresponding folder:
Http://dl-ssl.google.com/android/repository/docs-2.2_r01-linux.zip
Http://dl-ssl.google.com/android/repository/samples-2.1_r01-linux.zip
Http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip
Https://dl-ssl.google.com/android/repository/market_licensing-r01.zip
- Extract To The google_apis-8, directly put the add-ons directory, otherwise, first remove the top layer, put, such as docs, tools, platform-tools, market_licensing.
- In eclipse, specify the SDK directory (Help-> preference-> Android) (if the ADT is installed in step 2 and 3) and click apply. If the SDK appears, sometimes it appears (the ADB in tools cannot be found, you just need to copy the ADB in platforms-tools to the tool directory ).
- Add tools and platform-tools to environment variables.
In addition, during development, I found that the mobile phone could not be connected through the ADB through Ubuntu at the beginning. Through lsusb, I could find that the mobile phone could be connected and obtained through the ADB device command "??? No permission "prompt, this is mainly because of permission issues, you need to first stop the ADB daemon through ADB kill-server, and then start ADB with sudo ADB start-server. (The premise is to add ADB to the root environment variable, the simplest method is to create a soft link to ADB under the bin through ln-S/usr/bin/ADB/path/to/ADB ).