[Android]android 開發基礎 (一) – make update-api

首頁 >> Research >> Android >> [Android]android 開發基礎 (一) – make update-api

於framework裡新增public的class, method

在complier時會遇到錯誤:

==================================

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.

==================================

遇到這個問題可選擇以下解決方式:

1. 在新增的code裡面加上@hide

2.執行make update-api

如果不想每次都要另外執行make update-api

可到/frameworks/base/api 這個目錄找到current.txt

將執行過make update-api與伺服器上未執行過make update-api的code進行比對

就會發現執行過make update-api的current.txt 裡面新增了class或method

把新的current.txt取代伺服器上面的檔案

這樣下次從伺服器下載新的code就可以跳過make update-api這個步驟了



================================
分享與讚美,是我們繼續打拼的原動力.
若文章對您有幫助,望請不吝按讚或分享.
或者對影片有興趣可以訂閱頻道接收通知
================================
YouTube 頻道
FB 粉絲專頁
================================

guangyaw

重點主題: 程式設計: Python , Django,Android 工具與軟體: Open edX,Linux工具,Blender教學 分享各地美景與產品使用心得,遊戲實況,甚至影視戲劇等, 您的訂閱就是頻道成長的原動力。 YouTube 頻道: https://youtube.com/xyawli

You may also like...

發表迴響