Android 源代码引用缺失的类
我从 Android 开源项目中克隆了一些树来查看代码,但我无法构建它们,因为它们引用了似乎不存在的类。
例如,音乐应用程序 此处引用android.media.MediaFile
,根据包摘要 不存在,以及像 ArrayListCursor
这样的东西旧的 javadoc 周围,但 当前文档中不存在。
那么开源项目与发布的SDK脱节了吗?另外,有没有办法用当前的 SDK 构建这些开源包?
谢谢,
-JQP
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现有的 Android 应用程序与 SDK 没有任何关系。大多数是在 SDK 出现之前编写的。
因此,例如,有一个
android.media.MediaFile
类,以及一个ArrayListCursor
类。它们不是 SDK 的一部分,但您可以使用 Google 代码搜索< /a> 和package:android
限定符。如果“开源包”指的是应用程序,那么通常不行,它们不能使用 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 anArrayListCursor
class. They are not part of the SDK, but you can find the source for them quickly using Google Code Search and thepackage:android
qualifier.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.