2

I am writing my own SDK on android and as such creating my own jar. Now I create documentation of my SDK using droiddoc tool.

In my framework files(.java), there are many APIs that I have marked with @hide Now this is the current state:

a) all APIs marked with @hide are hidden in documentation.

b) These APIs marked hidden is INCLUDED in class files in generated jar file.(I use Java decompiler to check this).

Now when I include this jar in eclipse and use Ctrl+space on my class object to find its options, i can see that hidden APIs are actually visible and accessible here.

Am I missing anything here, and do I need to add any special flags in make file? Or is this a normal behaviour?

4

1 回答 1

2

我发现:

android.jar 删除了来自 com.android.internal 的所有类,并且所有标有@hide 的类、枚举、字段和方法也被删除了

所以带有@hide 的类不包含在jar 中-> 这就是为什么它们在eclipse 中无法访问。此外:

当您在设备上启动应用程序时,它会加载未切割的 framework.jar(大致相当于设备上的 android.jar),并具有所有内部 API 类和所有隐藏的 API 组件。

看看这篇文章这个答案
希望你找到隐藏东西的替代解决方案

于 2013-01-29T21:15:57.777 回答