How do I get the Java API sources?

While there seems to be a way to clone the whole repo, described here, I just need just the Java API files, nothing more. (Hint: traffic limit + slow connection)

Now, here is the whole git repo, but where are the plain Java API files? Or are they at a complete different location? Someone an idea? I’m not that much a git expert.

  • Repo sync fails to initialize CM13 work tree
  • Gradle script to autoversion and include the commit hash in Android
  • Maintain pro and free version in Android
  • Cannot commit android “gen” folder to Git
  • git command not recognisable in android studio terminal
  • How does the Android repo manifest repository work?
  • How to duplicate a git repository? (without forking)
  • Using 'git pull' vs 'git checkout -f' for website deployment
  • Git Daemon Hang SO_KEEPALIVE
  • Emacs projectile with multiple repos (git/svn etc.) in one project
  • Function in bash to commit and push in one command
  • No submodule mapping found in .gitmodules for path and missing .gitmodules file
  • 3 Solutions collect form web for “How do I get the Java API sources?”

    I have no idea what you think “the plain Java API files” are.

    The second link is not a git repo. It is a family of git repositories. Each row in that table is one git repo. The first link is for instructions on how to use Android-supplied tools to clone all of those repositories.

    If you think “the plain Java API files” refer to the java.* and javax.* classes, they are from the libcore repo.

    If you think “the plain Java API files” refer to android.* classes, they are from the frameworks/base repo.

    Other repos may be contribute other portions of “the plain Java API files”, such as Apache HttpClient.

    If all you are trying to do is poke through the code, I recommend Google Code Search. For example, I refer to the Android source code frequently, and I don’t have it downloaded.

    And if all you want to do is develop android applications, you don’t need any of this; just download the SDK

    Following worked, with the help of this question:

    git clone git://
    cd base
    git tag -l
    git checkout android-2.2.2_r1

    And then we get a nice directory: core/java/android

    tar cjf android-java-2.2.2.tbz2 core/java/android

    And then we get a nice bzip2-ed archive: android-java-2.2.2.tbz2, just 1.8MB 😉

    If u just need to see or download a specific JAVA API file from android.. then just refer this site

    this is has repo of all android release.

    Git Baby is a git and github fan, let's start git clone.