Ubuntu 14.04 32位 JDK+ADT Bundle+NDK安装

时间:2023-03-08 22:14:09
Ubuntu 14.04 32位 JDK+ADT Bundle+NDK安装

1. 安装JDK

tar或GUI解压jdk-8u25-linux-i586.tar.gz

编辑/etc/environment文件

CLASSPATH="/home/zhouwei/jdk1.8.0_25/lib:."
JAVA_HOME="/home/zhouwei/jdk1.8.0_25"

PATH增加:/home/zhouwei/jdk1.8.0_25/bin

2. 安装ADT Bundle for Linux

unzip或GUI解压adt-bundle-linux-x86-20140702.zip

在/etc/environment中增加路径:

/home/zhouwei/adt-bundle-linux-x86-20140702/sdk/platform-tools:/home/zhouwei/adt-bundle-linux-x86-20140702/sdk/tools

创建/usr/share/applications/eclipse.desktop文件

[Desktop Entry]
Version=1.0
Type=Application
Name=eclipse
Name[zh_CN]=eclipse
Comment=eclipse
Comment[zh_CN]=eclipse
Exec=/home/zhouwei/adt-bundle-linux-x86-20140702/eclipse/eclipse
Icon=/home/zhouwei/adt-bundle-linux-x86-20140702/eclipse/icon.xpm
Terminal=false

3. 安装NDK

chmod u+x android-ndk-r10d-linux-x86.bin

运行android-ndk-r10d-linux-x86.bin解压缩

在/etc/environment中增加路径:

/home/zhouwei/android-ndk-r10d

4. 为eclipse安装NDK路径补丁

复制com.android.ide.eclipse.ndk_23.0.2.1259578.jar到/home/zhouwei/adt-bundle-linux-x86-20140702/eclipse/plugins

5. 通过Android SDK Manager下载Android SDK

编辑/etc/hosts,提高下载速度

203.208.46.146 dl-ssl.google.com
203.208.46.146 dl.google.com

Android SDK Manager->Tools->Options, Force https打勾

6. 启动eclipse,配置ADK和NDK路径

最后我的/etc/environment文件内容如下:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/zhouwei/jdk1.8.0_25/bin:/home/zhouwei/adt-bundle-linux-x86-20140702/sdk/platform-tools:/home/zhouwei/adt-bundle-linux-x86-20140702/sdk/tools:/home/zhouwei/android-ndk-r10d"
CLASSPATH="/home/zhouwei/jdk1.8.0_25/lib:."
JAVA_HOME="/home/zhouwei/jdk1.8.0_25"