You have tried to change the API from what has been previously approved.
来源:互联网 发布:sql server 2005 x64 编辑:程序博客网 时间:2024/05/29 17:13
Android编译错误:You have tried to change the API from what has been previously approved.
android SDK中有些JAVA类是开放的,有些是不开放的,API同样如此。这里所谓开放的类或API,只是javadoc的范畴,并不是java中public和private,也就是说,对于源码的编译无所谓,只是对javadoc的生成有影响关于类的开放和隐藏,但是对android的上层应用有影响,因为非开放的类或API,android上层应用无法直接访问。
类或API是否开放,是通过doc的注释{@hide}来控制的。比如android.media.Metadata 这个类就是android没有公开的类,因为在frameworks\base\media\libmedia\Metadata.java文件中,定义Metadata类之前有/**{@hide}*/此doc注释,所以Metadata类被定义为了非公开类,即是在android应用程序中无法直接访问的类。
但是如果我们在Android的公开类中添加了一些自定义的成员方法或成员变量,生成我们修改后的sdk(jar包)供上层应用程序使用,此时在编译源码生成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.
******************************
google 给了两个选择:
1. 在你添加的API或者变量前面,(在java类中找到自己定义的变量)增加javadoc 注释@hide。但是要注意的是,并不是简单写个@hide 或者 /*@hide*/ 就可以了,这些都是错误的javadoc注释格式,标准的javadoc都是这样的 /** */ 而且对于 format 变量 应该加上 { }。
所以我们应该这样写 /** {@hide} */
2. 你就是想要生成的javadoc里面出现这个方法或者变量,你必须输入:
make update-api
但是如果修改的是google没有开放出来的类,比如RIL,PhoneFactory,就不会出现这个问题,
- Android编译错误:You have tried to change the API from what has been previously approved.
- You have tried to change the API from what has been previously approved.
- You have tried to change the API from what has been previously approved
- Android编译错误:You have tried to change the API from what has been previously approved.
- Android编译错误:You have tried to change the API from what has been previously approved.
- 修改Android framework源码报错(You have tried to change the API from what has been previously approved)
- 修改frameworks/base/ 代码后,make提示“You have tried to change the API from what has been previously approv”
- what have you tried?
- What have you tried?
- What have you done to the Earth, hackers?
- 13.You have executed this command to change the size of the database buffer cache:
- How to solve the problem : "You have been logged on with a temporary profile"
- have you tried Google Earth?
- how to fix "The App Name you entered has already been used"
- The object of type 'RectTransform' has been destroyed but you are still trying to access it
- 实现图形的填充--what I have been to
- EBS采购收货保存时,错误‘The quantity has not been converted from @@@ to Each, since 。。。’
- The CPU has been disabled by the guest operating system. You will need to power off or reset the vir
- VISTA、Win Server 2008、Win7 等系统音频系统底层API
- C++性能之内联函数
- XML的SAX解析器创建
- table布局 height=100%无效分析
- centos下面安装mysql
- You have tried to change the API from what has been previously approved.
- 计算几何求公式
- iPhone操作队列 VS Java线程池
- C/C++ 文件输入输出
- RHEL5无人值守安装
- UVa 311 - Packets
- 架构设计专栏01-跨程序域通信
- Struts2.0中的Cookie(实现自动登录)
- 劳教人员通过仪器戒赌 出狱后称看到扑克想撕