在ubuntu上搭建开发环境8---Ubuntu搭建Android开发环境

需要首先配置好JDK环境

  参看:http://www.cnblogs.com/xumenger/p/4460055.html

 

安装Eclipse

     在Android developer的官网上直接下载adt-bundle

  直接装adt-bundle,即eclipse+android sdk捆绑好,解压即用,这种方法极好,我用的是adt-bundle-linux-x86_64-20131030.zip

    命令: unzip adt-bundle-linux-x86_64-20131030.zip

  将解压后的放到/usr/local下面

    命令: mv ./adt-bundle-linux-x86_64-20131030 /usr/local/

 

在桌面上为eclipse创建快捷方式:

sudo vim /usr/share/applications/eclipse.desktop 

  添加以下内容:(Exec与Icon的值请根据实际情况修改)

#!/usr/bin/env xdg-open
 

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/adt-bundle-linux-x86_64-20131030/eclipse/eclipse
Categories=Application;Development;
Name=Eclipse
Comment="Eclipse IDE"
Icon=/usr/local/adt-bundle-linux-x86_64-20131030/eclipse/icon.xpm
Blueprint=3242-eDC-0520
Name[zh_CN]=Eclipse

然后将这个桌面文件拷贝到桌面:

  命令:  cp /usr/share/applications/eclipse.desktop /home/你的用户名/Desktop

但是这个时候并不能正确显示,因为权限有问题,所以需要在桌面上更改 eclipse桌面文件的权限

  命令:  su

       chmod -R 0777 /home/你的用户名/Desktop/eclipse.desktop

  卸载Eclipse很方便,就直接把/usr/local/adt-bundle-linux-x86_64-20131030删除了就好。

     重新安装就还是按照上面的步骤。

原文地址:https://www.cnblogs.com/xumenger/p/4460086.html