關於源碼編譯每次提示有錯誤 要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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM