Blog: Http://blog.csdn.net/muyang_ren
Ubuntu14.04 LTS (requires 64-bit long-term support version of LTS)
Jdk1.8
Kernel: android4.0
One: JDK
1. Unzip the JDK and get the path
2.
sudo vim /etc/environment
Modified to:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/lhy/jdk/jdk1.8.0_45/bin"JAVA_HOME="/home/lhy/jdk/jdk1.8.0_45"CLASSPATH=".:/home/lhy/jdk/jdk1.8.0_45/lib"
3, Source/etc/environment
Two: Ubuntu configuration
Note the version of the JDK version and compiler gcc, g++,
Website configuration: http://source.android.com/source/initializing.html
Ubuntu14.04:
sudo apt-getInstall Bison g++-Multilib git gperf libxml2-utilsMake Python-networkxzlib1g-dev: I386 zip put the following error on the installation is here. sudo apt-getInstall G++sudo apt-getInstall GCC-multilibsudo apt-getInstall G++-4.4-multilibsudo apt-getInstall Flexsudo Apt-getInstall LIBNCURSES5-devsudo apt-getInstall LIB32NCURSES5-devsudo apt-getInstall Gawk (this is on the Internet to see what needs to be installed, I have not made mistakes in advance installation)
Error occurred:
The following packages have unsatisfied dependencies: g++-Multilib : dependencies: GCC-Multilib (>= 4:4.8.2-1ubuntu6) but it will not be installed dependencies: g++ (>= 4:4.8.2-1ubuntu6) but it will not be installedE: the error cannot be corrected because you require certain packages to remain current, that is, they destroy the dependencies between software packages
Processing method:
sudo apt-get install g++sudo apt-get install gcc-multilib
Error occurred:
Checking Build Tools Versions ...************************************************************You is attempting to build with the incorrect versionof java. Your version Is:java version "1.8.0_45". The correct version Is:java SE 1.6.Please Follow the machine setup instructions athttp://source.android.com/source/download.html************************************************************build/core/main.mk:131:***Stop Stop it.
Solution,
1.6PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/lhy/jdk/jdk1.6.0_29/bin"JAVA_HOME="/home/lhy/jdk/jdk1.6.0_29"CLASSPATH=".:/home/lhy/jdk/jdk1.6.0_29/lib"
Error occurred:
g++selected multilib ‘32‘ not installedmake*** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] 错误 1
Workaround:
需要安装gcc、g++的multilib包,直接执行下面的命令,会自动安装g++、gcc的multilib包; sudoapt-getinstallg++-4.4-multilib
An error occurred (this can be ignored):
API。注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。注意:某些输入文件使用了未经检查或不安全的操作。注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
Solution (hand knock, do not tab key, the machine is not good will card long): Make Update-api
Error occurred:
/bin/bash: flex: command not foundmake: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp127
Workaround:
sudo apt-get install flex
Error occurred:
Host C:ADB <= System/core/adb/transport_usb. CHost C:ADB <= System/core/adb/commandline. CHost C:ADB <= System/core/adb/adb_client. CHost C:ADB <= System/core/adb/sockets. CHost C:ADB <= System/core/adb/services. CHost C:ADB <= System/core/adb/file_sync_client. CHost C:ADB <= System/core/adb/get_my_path_linux. CHost C:ADB <= System/core/adb/usb_linux. CHost C:ADB <= System/core/adb/utils. CHost C:ADB <= System/core/adb/usb_vendors. CHost C:ADB <= System/core/adb/fdevent. CHost EXECUTABLE:ADB ( out/HOST/LINUX-X86/OBJ/EXECUTABLES/ADB_INTERMEDIATES/ADB)/usr/bin/LD: Cannot find-lncursescollect2: LDReturned1Exit statusMake :*** [ out/HOST/LINUX-X86/OBJ/EXECUTABLES/ADB_INTERMEDIATES/ADB] Error1
Workaround:
sudo apt-get install libncurses5-dev
Error found:
/usr/bin/ld: cannot find -lncursescollect2:ld1 exit statusmake: *** [out1
Workaround:
sudo apt-get install lib32ncurses5-dev
Error found:
dalvik/vm/native/dalvik_system_zygote.cpp: in function ' int setrlimitsfromarray (arrayobject*) ': dalvik/vm/native/dalvik_system_zygote.cpp:194 : Error:aggregate ' rlimit rlim ' has incomplete type and cannot be defineddalvik/vm/native/dalvik_system_ Zygote.cpp:217 : Error: ' Setrlimit ' was not Declared in this scopemake: * * * [out /host/ LINUX-X86/OBJ/SHARED_LIBRARIES/LIBDVM_INTERMEDIATES/NATIVE/DALVIK_SYSTEM_ZYGOTE.O] Error 1
Workaround:
$ #include <sys/resource.h>
The following can be ignored
Note: Some input files use an unchecked or unsafe operation.
Note: To learn more, please use –XLI
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Learning "Android kernel compilation process and error notes"