You have tried to change the API from what has been previously approved
来源:互联网 发布:手机qq视频录像软件 编辑:程序博客网 时间:2024/05/21 02:52
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
- 求三个数中的最大数 (分别考虑整数、双精度数、长整数)【函数的重载】
- 电容参数:X5R,X7R,Y5V,COG 详解
- @synchronized vs dispatch_once
- 函数模板】求两个整数 或者三个整数中的最大数 自动判断你输入的是几个整数
- AudioServicesPlaySystemSound音频服务—IOS开发
- You have tried to change the API from what has been previously approved
- Oracle order by 处理NULL值
- 【Oracle】树状结构查询
- iOS多线程编程指南(四)线程同步
- Objective-C基础教程学习笔记 内存管理
- 关于raw os 的强实时性
- Open itunes by objective c
- Intent的常用Flag参数:
- Selenium简介