Ubuntu12.04 compilation exceptions and solutions 1 and 2. build/core/config. mk: 268: *** Error: cocould not find jdk tools. jar, please in ....... when I reinstall Java 6, be sure to modify the four items. Otherwise, the following jar will appear: command not found sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/java/jdk1.6.0/bin/java 300 sudo update-alternatives -- install/ usr/bin/javac/usr/lib/jvm/java/jdk1.6.0/bin/javac 300 sudo update-alternatives -- install/usr/bin/ Javah/usr/lib/jvm/java/jdk1.6.0/bin/javah 300 sudo update-alternatives -- install/usr/bin/jar/usr/lib/jvm/java/jdk1.6.0 /bin/jar 300 3./bin/bash: jar: command not found solution: cd/usr/bin must first enter/usr/bin, the following is sudo ln-s-f/usr/lib/jvm/jdk1.6.0 _ 30/bin/jar. My jdk is installed in the/usr/lib/jvm/jdk1.6.0 _ 30/directory. if javah is prompted: commond not found, so run cd/usr/binln-s-f/usr/lib/jvm/jdk1.6.0 _ 30/bin/javah. 4.g ++: G ++: selected multilib '32' not installed sudo apt-get install g ++-multilibsudo apt-get install libc6-dev ia32-libs lib32ncurses5-dev x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utilssudo apt-get install g ++-4.4-multilib v. make: * ** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard. classes-with-lo Cal. dex] Cause of Killed: memory is sufficient, and OOM is generated in linux. Solution: the memory is about GB and the hard disk is over 25 GB. The previous 1 GB and 10 Gb are enough. Official Note: "Note: The source download is approximately 6 GB in size. you will need 25 GB free to complete a single build, and up to 80 GB (or more) for a full set of builds. make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] Error 1 solution: sudo ln-s/usr/lib/i386-linux-gnu/mesa/libGL. so.1.2/usr/lib/libGL. so