Wednesday, October 17, 2012

How to view the android.jar source code in eclipse?



This plugin helps you to add source to android libraries in Eclipse.

In ADT >=8.0.0 you can add Android sources to Android container for all your project with installing the Android source feature using...

http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/

After downloading the com.android.ide.eclipse.source_16.0.0.201112171909.jar file in plugin folder, unzip it.We will get the below sources for the following API levels:

14 - Android 4.0.1
10 - Android 2.3.4
9 - Android 2.3
8 - Android 2.2
7 - Android 2.1
6 - Android 2.0.1
4 - Android 1.6
3 - Android 1.5

The plugin is about 240 MB size.

Each folder will contain the sources.zip file within it.Copy zip file from "10" folder and paste it into below path of corresponding version...

android-sdk-linux/platform/android-10/"paste here"

i.e sources.zip and android.jar both file will be in same folder.

Now restart you eclipse and browse to android.jar file,now you can view the source code....


No comments:

Post a Comment