5

I'd like to download the source code of both support library v4 and v7

but it seems like that in SDK Manager only the source code of Android itself can be found.

So where to download the support library source code? A zip file is better

======

Found source code of v4, but not v7

durron597
  • 31,968
  • 17
  • 99
  • 158
Alex Chan
  • 1,116
  • 3
  • 15
  • 33
  • I don't think it's open source – Ivo Oct 11 '13 at 13:20
  • possible duplicate of [Android Support Library (v4). Getting the source and attaching it to the library/jar in Eclipse](http://stackoverflow.com/questions/8543225/android-support-library-v4-getting-the-source-and-attaching-it-to-the-library). v7 will be located in a similar path. – Geobits Oct 11 '13 at 13:22
  • I can't find the source code of v7 – Alex Chan Oct 11 '13 at 13:28
  • 2
    How is this off topic? The guys is asking for source code to help debug his code. – Jason Tholstrup Apr 28 '16 at 17:49

6 Answers6

5

You can find it in the support repository.

Tomáš Linhart
  • 13,509
  • 5
  • 51
  • 54
4

You already have it, if you downloaded the support package through the SDK manager. Navigate to your sdk folder:

<sdk>/extras/android/support/v4/src
<sdk>/extras/android/support/v7/src
<sdk>/extras/android/support/v13/src
323go
  • 14,143
  • 6
  • 33
  • 41
  • 1
    There are 3 folders in v7/ , appcompt is what I what, but the src directory of of appcompt, I got only a .readme file – Alex Chan Oct 11 '13 at 13:34
  • You're right, and the readme files says "There is technically no source, but the src folder is necessary to ensure that the build system works." I've never looked in there -- it appears not to be open source. – 323go Oct 11 '13 at 13:40
3

The (Java) source for all the support libraries is nowadays in the same folder as the standard Android source code, that is, in <android-sdk>\sources\android-XX\. In particular, the <android-sdk>\sources\android-XX\android\support contains the full android.support package source code, which comprises all the support libraries.

For example:

  • FragmentManager, part of the "base" Support Library, is in <android-sdk>\sources\android-21\android\support\v4\app\FragmentManager.java.
  • ActionBarActivity, part of the v7 appcompat library, is in <android-sdk>\sources\android-21\android\support\v7\app\ActionBarActivity.java.
  • Same for cardview, mediarouter, &c.
matiash
  • 54,791
  • 16
  • 125
  • 154
2

I found the solution here. Have to git clone the source code from google source code server:

Cannot find Android support libraries source code (v4, v7 & v13)

Community
  • 1
  • 1
Alex Chan
  • 1,116
  • 3
  • 15
  • 33
0

You will probably find it on github. Try this link or Google it ;)

https://github.com/mastro/android-support-library-archive

guikk
  • 195
  • 5
0

I think it's possible via this github repository:

https://android.googlesource.com/platform/frameworks/support/
android developer
  • 114,585
  • 152
  • 739
  • 1,270