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

本文介绍了如何解决Perl环境中因Switch模块缺失导致的问题,并提供了解决Android原生开发中Zygote进程初始化阶段遇到的编译错误的方法,还涉及了zlib库配置的相关解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误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 <sys/resource.h>

#include "Dalvik.h"
#include "native/InternalNativePriv.h"
#include <sys/resource.h>

报错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/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值