The compilation environment must be a 64-bit system Ah, the duly installed 64-bit Ubuntu, virtual machine recommended server version, without the performance of the X province ...
Then to install OpenJDK 1.7, remember to update the source of the system, the following is a good
1Deb http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse2Deb http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse3Deb http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse4Deb http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse5Deb http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse6DEB-SRC http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse7DEB-SRC http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse8DEB-SRC http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse9DEB-SRC http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverseTenDEB-SRC http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
Then the sudo apt-get install OPENJDK-7-JDK dependent package will be downloaded and installed, and then java-version and duly completed.
Compile the dependent libraries you need to load:
sudo apt-get install Bison libc6-dev-amd64 Zlib1g-dev Lib64z1-dev Flex Libncurses5-dev Libx11-dev Gperf
Or it's going to go wrong halfway.
Well, it's still compiling, just wait for it.
Error, hint missing unzip, put on ...
Go on......
android5.0 AOSP compilation record (not completed)