Android source referencing missing classes

限于喜欢 提交于 2019-12-11 17:13:38

问题


I cloned some of the trees from the Android Open Source Project to take a look at the code, but I can't build them because they reference classes which don't seem to exist.

For instance, the music application here references android.media.MediaFile which according to the package summary does not exist, as well as things like ArrayListCursor which has an old javadoc around but is absent in current documentation.

So is the open source project disjoint from the released SDK? Also, is there a way to build these open source packages with the current SDK?

Thanks,

-JQP


回答1:


So is the open source project disjoint from the released SDK?

The stock Android applications have nothing whatsoever to do with the SDK. Most were written before the SDK existed.

So, for example, there is an android.media.MediaFile class, and an ArrayListCursor class. They are not part of the SDK, but you can find the source for them quickly using Google Code Search and the package:android qualifier.

Also, is there a way to build these open source packages with the current SDK?

If by "open source packages" you mean applications, then generally no, they cannot be built using the SDK. Someday, perhaps they can be, but not without substantial work in some cases.



来源:https://stackoverflow.com/questions/2726280/android-source-referencing-missing-classes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!