编译Android2.3出现的问题

问题1:

Unknown parameter a interfaceName fortags/attrs

make: ***

[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/JSHTMLElementWrapperFactory.h]

Error

255

make: *** Waiting for unfinished jobs....

Unknown parameter a interfaceName fortags/attrs

make: ***

[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h]

Error

255

Unknown parameter a interfaceName fortags/attrs

make: ***

[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h]

Error

255


解决方法:

修改文件WebCore/dom/make_names.pl
my $preprocessor = "/usr/bin/gcc -E -P -x c++"; 改为my $preprocessor = "/usr/bin/gcc -E -x c++";


问题2:

/usr/include/linux/errno.h:4:23: error: asm/errno.h: No such file or directory
make[2]: *** [crtbegin.o] Error 1


解决方法:

ln -s /usr/include/asm-generic /usr/include/asm



问题3:

g++: selected multilib  '32'  not installed

解决方法:

sudo apt-get install g++-4.4-multilib




问题4:

system/core/adb/usb_linux.c:37:27: fatal error: asm/byteorder.h: No such file or directory


解决方法:

sudo ln -s /usr/include/x86_64-linux-gnu/asm/ /usr/include/asm

make clean后再编译(否则不知道为什么还是有错)




问题5:

dalvik/vm/native/dalvik_system_Zygote.c:191: error: storage size of ‘rlim’ isn’t known


解决方法:

alvik/vm/native/dalvik_system_Zygote.c中添加头文件#include <sys/resource.h>


问题6:

In file included from system/extras/ext4_utils/output_file.c:30:
/usr/include/zlib.h:34: fatal error: zconf.h: 没有那个文件或目录
compilation terminated.



解决方法:

sudo cp /usr/include/x86_64-Linux-gnu/zconf.h  /usr/include/




问题7:

frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]


解决方法:

1、首先安装gcc4.4和g++4.4

sudo apt-get install gcc-4.4

sudo apt-get install g++-4.4

2、gcc和g++的降级

gcc降级:

sudo rm -rf /usr/bin/gcc

sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

g++降级

sudo rm -rf /usr/bin/g++

sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++






已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页