As we know, the android development environment need four part: JDK SDK IDE ADT.
Problems:
there are JDK versions from different companise. Previous, I run the command:
$sudo apt-get install openjdk-7-jdk
to install openjdk released by ubuntu ,and then,installing the eclipse IDE ,
$sudo apt-get install eclipse-platform
Coming next is installing the SDK from official website,all is well,
the troublesome occurred when I went to installed ADT and created a new project.
so, I don‘t support to use openjdk.
Solution:
1、The Jdk installed from oracle:
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java8-installer
and don‘t cofigue any environment variables。more information:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
the command to run test JDK is installed correctly
$java -version
2、installing the eclipse
eclipse vesion (Eclipse IDE for Java Developers) was download from http://www.eclipse.org/downloads/index-developer.php
and click eclipse.exe and eclipse will be start.
3、installing the SDK (http://developer.android.com/sdk/index.html)
choosing the stand-alone sdk tools,I move the sdk from Downloads file to /opt/Java
$sudo mv /Download/下载包名 /opt/Java
$cd /opt/Java
$sudo unzip ./下载包名
add environment path to file:
$sudo gedit /etc/profile
adding the following content in the end :
export ANDROID_HOME=/opt/Java/android-sdk-linux
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
next, testing installing SDK
$ android
the window will be open and can choose what the version you need install.
and URL: http://mirrors.neusoft.edu.cn sort:80
more information:http://ask.android-studio.org/?/article/34
4、Installing the ADT:installing sdk4.2.2,and I choose the ADT version is 23.
The information occurred by run project note that the ADT version need update when I installing ADT17
download the ADT form website .
and start eclipse
click Help->install new software... the first edit form input name and second is ADT path(click achive to add ADT file path)
restart eclipse to add sdk(window->preference,click android and choose android version)
all is well, create a new project ,right click the project to choose Run as to displyay the result.