How to easily find android class source

I know that I can get the Android source code from https://android.googlesource.com , but it's hard to choose the right git repository if I only know the package and class name of android.

Is there no way to find the file at https://android.googlesource.com ?

+7
android android-source
source share
5 answers

Most of the things you want to see can be found in the frameworks/base repo section. This includes almost all of the public and private API classes that make up the Android Java platform.

If you want to be able to view source code from Eclipse you can follow this guide: http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html

Finally, the Android SDK Reference Search extension for Chrome allows you to browse the public API by typing ad in the URL bar, and this adds a convenient "Source View" link to every Javadoc page.

+14
source share

Since 2011, source code can be downloaded using the SDK Manager (Window> Android SDK Manager)

  • Install Sources for Android SDK
  • Open the android.jar properties that you can find in the package explorer under the Android library.
  • In the Java Source Application, select the android / sdk / sources file as the external folder.

Edit: Eclipse tends to regularly check the external folder for updates. If this annoys you, you can pin the folder to .jar and then tell Eclipse to look at this jar for sources. Eclipse will no longer check for changes.

+2
source share
+1
source share

There is a problem released regarding an Android project for a single .jar file containing Java sources.

The issue has been rejected, but comments are a good source of methods for accessing the source in Eclipse.

0
source share

also, this is a very good tutorial on how to get the source in eclipse, without having to contact any of the repositories or anything else, it includes the source zip files (which may be outdated)

0
source share

All Articles