关于源码编译每次提示有错误 要make update-api

最近编译newline的版本的时候。。同事修改了andoid默认输入法为百度。这是系统自动提供的API,所以每次编译会提示

 

此时在编译源码生成SDK的过程中会出现这个问题:
******************************
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
   1) You can add "@hide" javadoc comments to the methods, etc. listed
in the
      errors above.
   2) You can update current.xml by executing the following commands:
         p4 edit frameworks/base/api/current.xml
         make update-api
      To check in the revised current.xml, you will need OWNERS
approval.
******************************
 make update-api #如果你在Android源码中添加了自定义的包、类、方法或者你修改了Android源码中标识为@hide的方法、类,你需要这些内容对 Application可见并且需要编译进SDK的Document中的话,这个命令是必须的(其实还有另外一种手工修改的方式替代这个命令的,呵呵);

因为每次下载新版本编译都会有错误后。执行make update-api才能通过。很麻烦。我通过 下面方法解决:

先下载新代码源码编译。错误后执行 make update-api 。以后不会有错误。然后 找到frameworks/base/api/ current.txt

,把这个文件替换代码库的 frameworks/base/api/ current.txt。以后你从代码库下载最新代码就不需要 make update-api
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值