Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attaching source to an external jar in an android eclipse project [duplicate]

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

like image 647
ekj Avatar asked May 24 '12 10:05

ekj


People also ask

Why can I not add external JARs in Eclipse?

If your project builds with Java 9+ make sure you've selected Classpath (as shown here). You should also be able to add the JAR with right-click on the project > Build Path > Add External Archives....


1 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.

like image 196
Stewart Francis Avatar answered Oct 19 '22 23:10

Stewart Francis