您的位置:首页 > 运维架构 > Linux

linux下android开发的环境搭建

2013-01-28 14:12 281 查看
1.install jdk

get the file jdk-6u26-linux-i586.bin

copy it to /home/opt/

install it by excute it $ ./jdk-6u26-linux-i586.bin

$ sudo vim /etc/environment

*add

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/kwanvin/opt/jdk1.6.0_26/bin:/home/kwanvin/opt/jdk1.6.0_26/jre/bin"

export CLASSPATH=$CLASSPATH:/home/kwanvin/opt/jdk1.6.0_26/lib:/home/kwanvin/opt/jdk1.6.0_26/jre/lib

$ sudo update-alternatives --install /usr/bin/java java /home/kwanvin/opt/jdk1.6.0_26/bin/java 300

$ sudo update-alternatives --install /usr/bin/javac javac /home/kwanvin/opt/jdk1.6.0_26/bin/javac 300

$ sudo update-alternatives --config java

choose the option .

$source /etc/environment

$java -version

if java version is 1.6.0.26,install succeed.

2.install eclipse

*download eclipse-mobile-juno-SR1-linux-gtk.tar.gz

*copy it to ~/opt/

$tar zxvf eclipse-mobile-juno-SR1-linux-gtk.tar.gz

*startup the eclipse

$. eclipse/eclipse

*install ADT

menu-help-install new software

Work with:https://dl-ssl.google.com/android/eclipse/

steps by steps.

it will restart once.

*setup Android SDK in the preferences.

In Preferences option

choose the SDK Location or download from the google site.

Mind that the SDK Location must be in Linux file system.

how to Create a shortcup for Eclipse

*open desktop,create an new file name Eclipse.desktop

edit it like:

[Desktop Entry]

Type=Application

Encoding=UTF-8

Name=Eclipse

Exec=/home/kwanvin/opt/eclipse/eclipse

Icon=/home/kwanvin/opt/eclipse/icon.xpm

Terminal=false

Categories=Development;

$chmod +x Eclipse.desktop

#copy it to the default drectory.

$sudo cp Eclipse.desktop /usr/share/applications/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: