现在的位置: 首页 > 综合 > 正文

ROM编译常见错误

2019年01月05日 ⁄ 综合 ⁄ 共 877字 ⁄ 字号 评论关闭

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 值改成和你代码中值一致就可以了。


抱歉!评论已关闭.