Home » Android » Attaching source to an external jar in an android eclipse project

Attaching source to an external jar in an android eclipse project

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am building an android application that uses several third party libraries. I have added them to the /libs directory and they were automagically added to a library called “Android Dependencies”. However, when in the “Configure Build Path” view and attempt to attach source the dialog to select the source doesn’t show. Additionally, it appears to be marked as “non modifiable”

How do I attach the source?

Here is a screen shot.

Screenshot

How to&Answers:

It seems like this was broken in Android SDK, as reported in this bug:

http://code.google.com/p/android/issues/detail?id=28658

It seems like there’s a workaround as shown here:

https://android-review.googlesource.com/#/c/35702/

As the workaround was only fixed recently, it may not be available in the latest version of the SDK, the status of the issue would seem to suggest it’s not available yet, though I’ve not tried it myself, so may be corrected.