编译android4.0.4报错和对应的解决方法总结

错误1:
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .
解决方法:
sudo apt-getinstall libswitch-perl
sudo apt-get  install libxml2-utils

报错2:
dalvik/vm/native/dalvik_system_Zygote.cpp: In function ‘int setrlimitsFromArray(ArrayObject*)’:
dalvik/vm/native/dalvik_system_Zygote.cpp:193: error: aggregate ‘rlimit rlim’ has incomplete type and cannot be defined
dalvik/vm/native/dalvik_system_Zygote.cpp:216: error: ‘setrlimit’ was not declared in this scope
解决方法:
在dalvik/vm/native/dalvik_system_Zygote.cpp中间增加一个头文件定义#include

#include "Dalvik.h"
#include "native/InternalNativePriv.h"
#include

报错3:
/usr/include/zlib.h:34: fatal error: zconf.h: No such file or directory
compilation terminated.
解决方法:
cp /usr/include/x86_64-linux-gnu/zconf.h /usr/include/

你可能感兴趣的:(android,linux)