在eclipse中查看Android SDK源代码

首先是下载你使用的Android SDK相对应的源代码
下面这个网站有各种版本的源代码:

http://rgruet.free.fr/public/


android-1.5-cupcake-src.zip 04-Oct-2009 03:07 21.6M
android-1.6_r1-donut-src.zip 04-Oct-2009 03:02 22.9M
android-2.0-eclair-src.zip 21-Nov-2009 01:21 24.4M
android-2.1-eclair-src.zip 06-Jul-2010 13:08 30.2M
android-2.2-froyo-src.zip 06-Jul-2010 12:59 33.4M

然后在对应的SDK版本下目录下建立sources目录,在把代码解压到sources目录下,这样Eclipse就可以直接识别源代码了。
为什么是这个目录呢?
查看 Windows –> Preferences –> Java Build Path –> Libraries –> Android 2.X – > android.jar –> Source attachment

我的步骤:
下载:

http://rgruet.free.fr/public/android-2.1-eclair-src.zip

我的SDK_HOME 是:/home/app/android-sdk/
建立source目录:/home/app/android-sdk/platforms/android-2.1_r01-linux/sources
下面是我的目录结构:
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/android
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/com
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dalvik
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dasm
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/data
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dex
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dot
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dxc
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/dxconvext
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/jar
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/java
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/java_cup
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/javax
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/jdiff
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/jp
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/junit
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/mock_android
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/org
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/other
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/otherpackage
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/otherpkg
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/proguard
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/signature
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/spechelper
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/SQLite
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/src
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/sun
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/targets
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/testprogress2
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/tests
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/util
/home/app/android-sdk/platforms/android-2.1_r01-linux/sources/LICENSE

 

From : http://www.herbertyang.com/

你可能感兴趣的:(eclipse,windows,android,Build,Path,2010)