ROM编译常见错误

来源:互联网 发布:主页 劫持 软件开发 编辑:程序博客网 时间:2024/06/05 11:04

1.编译错误

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

如果编译了一次  需要在out/target/common/obj/PACKAGING/public_api.txt'中找到“FLAG_SHOW_LIGHTS”,把里面的value 值改成和你代码中值一致就可以了。



0 0