
Question:
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 <a href="http://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=src/com/android/music/AlbumBrowserActivity.java;h=ba3e2127606f310f61b1f32fe2d01656cd81a57e;hb=master" rel="nofollow">here</a> references android.media.MediaFile
which according to the <a href="http://developer.android.com/reference/android/media/package-summary.html" rel="nofollow">package summary</a> does not exist, as well as things like ArrayListCursor
which has an old <a href="http://www.androidjavadoc.com/m5-rc15/android/database/ArrayListCursor.html" rel="nofollow">javadoc</a> around but is <a href="http://developer.android.com/reference/android/database/AbstractCursor.html" rel="nofollow">absent in current documentation</a>.
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
Answer1:<blockquote>
So is the open source project disjoint from the released SDK?
</blockquote>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 <a href="http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/media/java/android/media/MediaFile.java&q=package:android%20MediaFile&sa=N&cd=1&ct=rc" rel="nofollow">android.media.MediaFile
</a> class, and an <a href="http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/com/android/internal/database/ArrayListCursor.java&q=package:android%20ArrayListCursor&sa=N&cd=1&ct=rc" rel="nofollow">ArrayListCursor
</a> class. They are not part of the SDK, but you can find the source for them quickly using <a href="http://www.google.com/codesearch?hl=en" rel="nofollow">Google Code Search</a> and the package:android
qualifier.
Also, is there a way to build these open source packages with the current SDK?
</blockquote>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.