How to connect Android source to Eclipse

I have previously had success with the Android source for Eclipse by following Finn Johnsen's instructions here .

However, this approach seems to stop working:

samuel-josephs-computer-4:android-sources samueljoseph$ git checkout origin/froyo-release Previous HEAD position was 1de4a2c... am 62619392: Merge "Fix leak when keylock is recreated." HEAD is now at adba66b... This class no longer exists. 

There was a later blog here , in which there was some pre-organized source for Eclair, but since then nothing.

There are also some StackOverflow posts from 2008 (older than above), for example. https://stackoverflow.com/questions/3182904/attaching-java-source-to-android-projects-in-eclipse .

What is the real guide for this?

+45
android eclipse
Mar 08 2018-11-11T00:
source share
6 answers

There is an Eclipse plugin called Android Sources that installs sources through Gingerbread. I have not tried this recently.

+32
Mar 08 '11 at 15:03
source share

There is an updated guide. Thus, for this you do not need to install the eclipse plugin.

Here's the link

Snip on top Link:

follow these steps if you have already downloaded Android source files

  • Go into eclipse and press F3 over any android source that is not there, for example Activity. And get this annoying window that we all hate:

  • Click "Attach Source", select "External Folder" and select the kernel / java in the base folder.

+41
Apr 16 2018-11-11T00:
source share

For Android 4+, here is a tutorial for connecting sources for eclipse.

EDIT:

  • First download the source and javadoc from sdk manager. Download these.
  • Open Your_Project -> Android XXX , right-click on android.jar and select Properties .

  • Specify the source path as the Java Source Attachment → Location Path by clicking External Folder enter image description here

  • Specify the reference path as Javadoc Location → Javadoc Location Path by clicking Browse enter image description here

Now you can view the following sources: enter image description here

+31
Jul 21 '13 at 20:10
source share

Here is the tutorial :

  • Make sure you install / download the Android source for the corresponding version of the Android SDK API.

    1.1 Check the version of the API version specified in the Eclipse project for Android / Project Build:

    project Properties / Android

  • Open Project Properties / Java Build Path and click the "Link Source ..." button on the "Source" tab:

    project Properties / Java Build Path

  • Indicate where you installed the Android SDK, expand the Sources folder, select the appropriate version of the source API (and click OK):

    select source API version

  • Further...

    Link source

  • An important step is to exclude the entire associated source from the building. Otherwise, we may have some repeating source errors, plus who wants to build the entire Android source when we already have banks! So, click "Add ...", enter * , click "OK" (and then "Finish"):

    exclude everything

  • Make sure everything is configured correctly:

    configured

The desired result is a connected platform source without side effects:

source

Hope this helps :)

+12
Feb 06 '14 at 20:14
source share

Better way: below.

  • Update the Android SDK Manager, including the source of the version you need.

  • click on Any class, for example activity, if the source is correctly connected, it will open the Activity class.

  • If it does not open, click on the connection source and specify the source path as described above.

  • The source path will be similar to android-sdk-windows \ sources \ android-17

This will help you add the source for the Android SDK.

+8
Oct 30 '13 at 6:43
source share

You can do it this way .... hover or copy paste any class_name that is provided from android, just press F3 , you will find the Attach_a_source tag Attach_a_source , click on it and here view your android-sdk folder and from it just pick source folder because inside it every android files resides .

+1
Mar 19 '13 at 7:02
source share



All Articles