Build Android4.0.3错误

build/core/main.mk:670: *** Module 'AlarmProvider' in PRODUCT_PACKAGES has nothing to install!.  Stop.

./build/target/product/large_emu_hw.mk:25:    AlarmProvider 

./build/target/product/generic_no_telephony.mk:24:    AlarmProvider


Package SDK: out/host/linux-x86/sdk/android-sdk_eng.liuhongchao_linux-x86.zip

SDK: warning: including GNU target out/target/product/msm8660_surf/system/lib/libdbus.so

sdk/build/tools.atree:46: couldn't locate sourcefile: usr/share/pc-bios/bios.bin

sdk/build/tools.atree:47: couldn'tlocate source file: usr/share/pc-bios/vgabios-cirrus.bin

sdk/build/tools.atree:133: couldn't locate source file: framework/ddmlib-tests.jar

sdk/build/tools.atree:134: couldn't locate source file: framework/ninepatch-tests.jar

sdk/build/tools.atree:135: couldn't locate source file: framework/common-tests.jar

sdk/build/tools.atree:137: couldn't locate source file: framework/sdkuilib-tests.jar

make: *** [out/host/linux-x86/sdk/android-sdk_eng.liuhongchao_linux-x86.zip] Error 44

NO sdk/android-sdk_eng.liuhongchao_linux-x86.zip created


解决办法:

这里的framework目录指的是:~/Android_Src/out/host/linux-x86/framework   这个目录,

是sdk/build/tools.atree这个文件有bug,上面那几个文件的路径写的不对,其实在

Src/out/host/linux-x86/framework 目录下是有这几个文件的,

$cp ~/Android_Src/prebuilt/common/pc-bios   ~/Android_Src/usr/share 

cd ~/Android_Src/out/host/linux-x86/framework

$cp ddmlib.jar  ddmlib-test.jar   

$cp sdkuilib.jar  sdkuilib-test.jar //其他同样 


---------------------------------------------------------------------------------------------

编译环境

vm+ubuntu12.04 64bit + android ics4.0代码


在编译源代码的时候出现该错误

/usr/bin/ld.bfd.real: cannot find -lGL

/usr/bin/ld.bfd.real: cannot find -lX11

根据网上大多数的说法,以及官网的介绍。截至5月底,android对ubuntu12.04的编译平台的支持不是很推荐,有些库的兼容方面会有一些问题

这两个错误报的错其实就是说没有在库路径中找到libGL.so libX11.so

但是打开etc/ld.so.conf.d中查看64位的库路径下x86_64-linux-gnu.conf配置文件

# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

该路径下是有libGL.so的,并且查看文件链接指向没有问题。但是编译起来还是有错。

后来再查看了一些资料,因为编译的时候还是用到了32BIT的libGL.so libX11.so库文件,编译的时候找的不是X86_64库文件配置,而是找的是I386库文件配置

# Multiarch support
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu

果然在I386目录下没有找到这两个文件

首先安装这两个库文件的32位版本:

$ sudo apt-get install libx11-dev:i386(libX11.so)

$ sudo apt-get installibgl1-mesa-glx:i386(libGL.so)

由于libGL.so系统默认没有进行库路径下的链接,还需要手动链接一下

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so




查找指定的符号在Android.mk中

find ./ -name Android.mk -exec grep -l {} \;



环境要求改变。
    现在要求内存1.5G左右,硬盘25G以上,以前1G、10G就够了。官方说明“Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.”
     可惜我编之前没看,编译报错如下:   
错一:
host SharedLib: libbcc (out/host/linux-x86/obj/lib/libbcc.so)
collect2: ld terminated with signal 9 [Killed]
make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes-with-local.dex] Killed
make: *** Waiting for unfinished jobs….
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc] Error 1
collect2: ld terminated with signal 9 [Killed]
collect2: ld terminated with signal 9 [Killed]
make: *** [out/host/linux-x86/obj/lib/libbcc.so] Error 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/clang_intermediates/clang] Error 1
weihongcsu@ubuntu:~/disk2/android-4.0.1_r1$
错二:
target Dex: framework
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Killed
weihongcsu@ubuntu:~/disk2/android-4.0.1_r1$
错三:
arm-eabi-g++: Internal error: Killed (program cc1plus)
解决办法:
这些错误都是 linux的OOM killer 导致,“内存1.5G左右,硬盘25G”就可以解决,我为了保险,把make -j4改成了make.编译5个小时以上吧,out目录大小:12G。

你可能感兴趣的:(android,Module,File,Build)