On a whim these days, I want to write Android software on Ubuntu. So just find some information on the Internet to build an Android environment on Ubuntu, the result is either incomplete or outdated. So I wrote down the process of setting up my Android environment so that I could forget about the reference and give some inspiration to the readers of this blog post.
There are several steps to building an Android environment:
1. You have to install Java.
Download link java
Choose the latest version, unzip the JDK to the folder you want to put, mine is /var/android/java.
Then configure the environment variables:
sudo gedit/etc/profile, added at the end of the profile file
Export Java_home=/var/android/java
Export classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar
Export path= $PATH: $JAVA _home/bin
The red ones are the ones you need to change.
Then reboot the system and enter the Java and JAVAC tests on the terminal successfully
2. Install Eclipse
: http://www.eclipse.org/downloads/
What about the other decompression?
I'm extracting it to /var/android/jeclipse .
It's better to manage.
3.ConfigurationADT
Launch Eclipse, menu help, Install New software ...- Available softwareon the Select tab,
Click on the right button "Add ..."and the dialog box is set up as follows:
Name: ADT (Feel free to fill in)
location:http://dl-ssl.google.com/android/eclipse/
Click "OK" to return, click "Select All"after returning and click "Next >" two times.
You can also download the ready-made files and install them directly from the Internet.
4. Set the SDK path
EclipseAfter rebooting, selectWindow > Preferences ..., in the Properties box that opens, selectAndroid,InSDK LocationIn the Enter yourAndroid SDKdirectory, and then press theApplyButton.
Download Link: Click to open the link
Update after download
after the download is complete, unzip the terminal into the root directory of the SDK and execute: T ools/android Update Sdk–u
You can start the same updates as in Windows.
The android1.0-4.2 in platform of the SDK are clicked to open the link. Celestial estimates can not download it, I was the wall of the arduous download.