Java – The appcompat-v7 source is missing from the android repository

The appcompat-v7 source is missing from the android repository… here is a solution to the problem.

The appcompat-v7 source is missing from the android repository

In SDK Manager there is a location called:
Android Support Repository

There I can find jar sources for libraries like CardView, like Support-V4, and Javadoc JAR files. However, in some projects, such as Appcompat or GridLayout, there is no source jar file or javadoc file.

I

wonder why this is the case, and if I can get the latest (version 21.0.0) resources for both from elsewhere? The official android git repository does not contain new java files (for example, no ActionBarDrawerToggle java files, among many others).

Solution

The source code for appcompat-v7 is available in the “API21/Sources for Android SDK” package and can be downloaded using SDK Manager at \sdk\sources\android-21\android\support\v7\

When you point this directory to the appcompat-v7 source directory root, Android Studio will allow you to browse the lib source code.

Related Problems and Solutions