Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

After installing ADT, I used SDK Manager to download the source codes for the latest android API. Now when I run the Eclipse version that was provided with the ADT, I still can't see the android source codes.

Is there a simple way to fix this?

share|improve this question
possible duplicate of this question – d3m0li5h3r May 8 at 4:49
I saw that one but it refers to a separate plugin for the sources not the android SDK Manager. I just thought it would be automatic if use use the ADT... – tbkn23 May 8 at 5:31
add comment (requires an account with 50 reputation)

3 Answers

up vote 3 down vote accepted

Open SDK Manager-->install source under api(i.e Android 4.0)

if You got No sources attached then click the button, then choose the Directory

e.g: D:\Android\android___sdk\sources\android-17\ ---> this my android sdk location

Depend upon your android installation directory choose accordingly.

share|improve this answer
add comment (requires an account with 50 reputation)

After downloading the Sourcecode by useing the "Android SDK Manager", you have to change the settings in your eclipse-porject.

At first, just have a look where the Sourcecode has been downloaded. In my case (useing Windows 8) its here: "C:\adt-bundle-windows-x86_64-20130219\sdk\sources\android-17"

Now go into Eclipse. Open the "Properties" of the project (right click on the project-folder and click on "Properties"). On the left side click on "Java Build Path" and then click on the tab-page "Libraries". Next you click on the right side on the button "Add External Class Folder...". Select the folder where you find the sourcecode. In my case its the folder "android-17" of the path "C:\adt-bundle-windows-x86_64-20130219\sdk\sources\android-17".

Commit / close all windows with ok. (Maybe you should restart eclipse.) And now you can see/read the Android-Sourcecode. (But only in the project which you have choosen before.)

share|improve this answer
add comment (requires an account with 50 reputation)

First, you need to download them. Use Android SDK Manager -> Android X.Y.Z (API A) -> Sources for Android SDK.

Then, you need to attach the folder with the sources the next time you browse there: /sources/android-A

share|improve this answer
add comment (requires an account with 50 reputation)

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.