First problem: the 32-bit Ubuntu 12.04 compile Android4.0.4 source when there is an error on emulator, the key is its Makefile in the -m64 parameters, which can be replaced with -m32, the following error message:
ERROR: prebuilts / tools / gcc-sdk /../../ gcc / linux-x86 / host / x86_64-linux-glibc2.7-4.6 / bin / x86_64-linux-gcc only run on 64-bit linux
make: *** [out / host / linux-x86 / obj / STATIC_LIBRARIES / emulator64-target-arm_intermediates / tcg / tcg.o] Error 1
Documents related to the need to change is as follows:
external / qemu / Makefile.target
external / qemu / Makefile.common
Second problem: The following message appears when compiling:
target Dex: core
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
make: *** [out / target / common / obj / JAVA_LIBRARIES / core_intermediates / noproguard.classes-with-local.dex] Error 1
Find build / core / definitions.mk files found the following:
#TODO: Use a smaller -Xmx value for most libraries;
# Only core.jar and framework.jar need a heap this big.
# Avoid the memory arguments on Windows, dx fails to load for some reason with them.
@echo "target Dex: $ (PRIVATE_MODULE)"
@mkdir -p $ (dir $ @)
$ (Hide) $ (DX) \
$ (If $ (findstring windows, $ (HOST_OS)) ,, - JXms16M -JXmx2048M) \
--dex --output = $ @ \
$ (Incremental_dex) \
$ (If $ (NO_OPTIMIZE_DX), \
$ (If $ (GENERATE_DEX_DEBUG), \
--debug --verbose \
--dump-to = $ (@ :. dex = .lst) \
--dump-width = 1000) \
$ (PRIVATE_DX_FLAGS) \
Since the contents of my computer only 2GB, then the above 2048M certainly can not meet because of the need to allocate kernel memory allocation when linux, so adjust the parameters for the small 1024M.
Will continue to compile some errors on the emulator, and consult the google official information, that is to compile on 64bit systems, replaced after 64, what mistakes did occur, compile all normal.