Skip to content Skip to sidebar Skip to footer

How To Find Every Version Of Android Support Libraries Source Code

I meets some problems so I want to find the source code of the Android support libraries . For example , I want to read the ActionBarActivity.java source code in version 19.0.1 and

Solution 1:

You can download prebuilt source jars by version from here https://android.googlesource.com/platform/prebuilts/maven_repo/android/+/master/com/android/support/appcompat-v7

Although it seems they have removed sources for anything older than 22.1.0 there.

Alternatively you can get all changes for a specific file here https://android.googlesource.com/platform/frameworks/support/+log/master/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java

Solution 2:

You can browse to your sdk directory and support directory and you can find the aar files there- on mac its i located on

/Users/username/Library/Android/sdk/extras/android/m2repository/com/android/support/

Ensure you are having the the version you want to see. And Then change the version in your gradle.build to the one you need. Then sync the project, Now Change the explorer mode of android studio to the project mode.

enter image description here

Now you can browse to the external libraries to see the sources.

enter image description here

Solution 3:

So simple Just create a project with version 19.0.1 and crate other project with version 20.0.0 , then extend your activity from actionbaractivity or else , Hold on ctrl key and click on actionbaractivity .

Solution 4:

If you have downloaded the sources, you should be able to find them versioned at one of these three places (using OSX, but should be familiar enough to deduce the OS locations)

Android Sources

~/Library/Android/sdk/sources/

Maven Local Repo

~/.m2/repository

Gradle Cache (location could probably be a different name)

~/.gradle/caches/modules-2/files-2.1

Using either of these, it shouldn't be too hard to do a diff of the source code that you need.

Solution 5:

If you don't want to use any IDE, you can download command line tools only from https://developer.android.com/studio/index.html#downloads

This example is for OSX:

  1. After download command line tools, you can run SDK Manager using this command: "sh android", maybe you need to add "sudo" before the command.
  2. SDK Manager will show up Android SDK Manager
  3. Select Sources for Android SDK or any packages you want to download Download sources
  4. Click button Install, and accept licences.
  5. After download succeed, you can navigate to the folder where you put the SDK, and then go to sources and navigate to ActionBarActivity or any sources you wantSources of Android code

Post a Comment for "How To Find Every Version Of Android Support Libraries Source Code"