一、安装jdk

1.下载 合适的jdk(32位,64位)jdk-6u21-linux-i586-rpm.bin现在是32位

2.执行 ./jdk-6u21-linux-i586-rpm.bin

cp  jdk-6u21-linux-i586.rpm  /usr/local

3.解压 cd /usr/local --->rpm -ivh jdk-6u21-linux-i586.rpm

4.配置环境变量

#vi /etc/profile

JAVA_HOME=/usr/java/jdk1.6.0_21

CLASSPATH=.:$JAVA_HOME/lib/tools.jar

PATH=$JAVA_HOME/bin:$PATH

export JAVA_HOME CLASSPATH PATH

二、安装eclipse

三、安装 android sdk

四、下载android的源码配置

1.安装git

A、yum -y install zlib-devel openssl-devel perl cpio expat-devel gettex-devel perl-ExtUtils-MakeMaker(git依赖的包)

B、wget http://curl.haxx.se/download/curl-7.25.0.tar.gz(安装curl)

tar -xzvf curl-7.25.0.tar.gz

cd curl-7.25.0

./configure

make

make install

C、vi /etc/ld.so.conf 中加入 /usr/local/lib 保存文件继续运行/sbin/ldconfig(为git-http-push作准备)

D、wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz

tar -xzvf git-latest.tar.gz

cd git-{date}

autoconf(no command 则 yum install autoconf 会对curl版本有要求)

./configure

make

make install

2.×××

A、

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

$ repo init -u https://android.googlesource.com/platform/manifest

$ repo sync

问题
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo

$ export PATH=$HOME/bin:$PATH

$ mkdir mydroid
$ cd mydroid

$ repo init -u git://android.git.kernel.org/platform/manifest.git
$ repo sync

出现 /root/bin/repo: line 1: syntax error near unexpected token `newline'这个问题所以使用上面的方法获取