编译源码时出现 Checking API: checkapi-last (unknown): error 17解决方法

原文地址::http://www.eoeandroid.com/thread-84145-1-1.html

相关网帖
1.关于android中的check api----http://blog.sina.com.cn/s/blog_55b1b0d50100jlge.html
2.在Ubuntu上编译CyanogenMod 2.3 generic----http://www.linuxidc.com/Linux/2012-01/50984.htm



log:

Copy: apicheck (out/host/linux-x86/obj/EXECUTABLES/apicheck_intermediates/apicheck)
Install: out/host/linux-x86/bin/apicheck
Checking API: checkapi-last
(unknown): error 17: Field android.app.Notification.FLAG_SHOW_LIGHTS has changed value from 1 to 0

******************************
You have tried to change the API from what has been previously released in
an SDK.  Please fix the errors listed above.
******************************


make[1]: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38
make[1]: Leaving directory `/home1/work/android_eRD4.2/src'
make: *** [compile] Error 2


//----------------------------------------------------

这是因为修改了framework层里的东西,而且在全编译make源码之前,用了make update-api命令,导致 源码之前的api 与你自己新的源码里的值不一样导致。

解决办法:

自己找到了在framework/base/api 下有n(n取决于你源码的版本,如果你源码的版本是2.1 ,那么就 有分别以 1~ 7命名的xml,就是api level)个xml文档,分别对应android api 的不同版本。   在这些xml中,把你在framework层中修改的地方对应进去。 如我这个错误的地方,在8.xml 和 current.xml 中找到“FLAG_SHOW_LIGHTS”,把里面的value 值改成和你代码中值一致就可以了。

//-----------------------------------------------------

是在make全编译之前忘记make update-api 导致的这个问题。解决办法有2:1、make clean--> make update-api --make ; 2、要么手动添加相应版本的api值,使编译通过。







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值