How to find easily the source of an android class

前端 未结 6 1024
别那么骄傲
别那么骄傲 2021-01-02 12:56

I know I can access android source code from https://android.googlesource.com, but it\'s hard to select the right git repo if I only know the package and the name of an andr

6条回答
  •  离开以前
    2021-01-02 13:50

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

    • Install package "Sources for Android SDK"
    • Open Properties of android.jar, which you can find in the package explorer below the Android library
    • In "Java Source Attachment", select android/sdk/sources as external folder

    Edit: Eclipse seems to regularly scan the external folder for updates. If this annoys you, you can zip the folder into a .jar and then tell Eclipse to look in that jar for the sources. Eclipse will then no longer scan for changes.

提交回复
热议问题