修改系统api,变量编译报错

来源:互联网 发布:e4a数据库怎么破解 编辑:程序博客网 时间:2024/06/15 22:11


target Java: send_bug 


(out/target/common/obj/JAVA_LIBRARIES/send_bug_intermediates/classes)
Checking API: checkapi-last
Checking API: checkapi-current
out/target/common/obj/PACKAGING/public_api.txt:15308: error 13: Field 


android.os.Build.MODEL has changed 'final' qualifier


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

******************************



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

解决办法:

自己找到了在framework/base/api 下有n(n取决于你源码的版本,如果你源码的版本是4.2,其api level就是17,那么就看17.xml或者17.txt ,修改这个里面的值即可 )个xml文档,分别对应android api 的不同版本。


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