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

Some of the src folders on my copy of the samples, found at $SDK_DIR/extras/android/support/ seem to be empty. For example, v7/gridlayout/src/ is an empty folder, but most of my v4 folders have the source code supplied alongside the download from the SDK Manager, so I'm going to guess you and I are seeing the same issue.

However, you can always download the source directly from the source (no pun intended):

Doing a git clone https://android.googlesource.com/platform/frameworks/support/ to download the support library files direct from Google's repository seems to contain all of the source files.


Those that are looking for sources per version, can find it locally (provided that you downloaded it previously) at:

$SDK_DIR/extras/android/m2repository/com/android/support/$libname/$version/$libname-$version-sources.jar

Jar file (as you probably know) is essentially a zip file - therefore you can simply extract its contents.

For example, support-v4 v23.1.1 located at:

$SDK_DIR/extras/android/m2repository/com/android/support/support-v4/23.1.1/support-v4-23.1.1-sources.jar

Tags:

Android