Some Java classes in the android SDK are open, some are not open, and the same is true for APIs. The so-called open classes or APIs here are only the scope of javadoc, and are not public and private in Java. That is to say, it doesn't matter for source code compilation, only the creation of javadoc has an impact on the opening and hiding of classes, but it has an impact on upper-layer Android applications. Because of non-open classes or APIs, upper-layer Android applications cannot be directly accessed.
Whether the class or API is open is controlled by the doc comment {@ hide. For example, android. media. metadata is a class that is not publicly available for Android, because in frameworks \ base \ media \ libmedia \ metadata. in the Java file, there is/** {@ hide} */This Doc annotation before defining the metadata class. Therefore, the metadata class is defined as a non-public class, it is a class that cannot be directly accessed in the Android Application.
However, if we add custom member methods or member variables to the Open Class of Android, the modified SDK (jar package) will be generated for upper-layer applications, this problem occurs during the process of compiling the source code to generate the SDK:
******************************
You have tried to change the API from what has been previusly approved.
To make these errors go away, you have two choices:
1) You can add "@ hide" javadoc comments to the methods, etc. Listed
In
Errors abve.
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 provides two options:
1. Add the javadoc annotation @ hide before the API or variable you added. However, it should be noted that you do not simply write @ hide or/* @ hide */. These are all incorrect javadoc annotation formats, and the standard javadoc is like this.
/***/And {} should be added to the format variable {}.
So we should write/** {@ hide} like this}
*/
2. This method or variable appears in the javadoc you want to generate. You must enter:
Make Update-API
However, if the modified class is not opened by Google, such as RIL and phonefactory, this problem will not occur,