Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The jar of this class file belongs to container 'Android Dependencies' which does not allow source modifications to source attachments on its entries

I have a library project and another project which uses some classes from the library project. As soon as I am setting a break point in one of the library classes, and my app stops at the break point, Eclipse shows me the error message

Source not found

The jar of this class file belongs to container 'Android Dependencies' which does not allow source modifications to source attachments on its entries

Can someone help me?

the error message

like image 425
stoefln Avatar asked Sep 22 '13 09:09

stoefln


2 Answers

I found the answer!

Somehow (dont ask me why) Eclipse messed up my librarry projects classpath file. it listed the "src" classpath entries in the wrong order (see attachment below).

looks like only the first entry is currently exported to the libraryproject.jar, which is used by my app-project. Therefore only the gen-sources got attached, and not the sources in the src dir.

enter image description here

like image 94
stoefln Avatar answered Sep 30 '22 16:09

stoefln


I finally found the real and most simple solution to this.

If you have a complex structure where one library project use a library, and that library project is used for your project, and so on. Or in any case... do this to solve this problem:

Import to eclipse the library you want to be able to see the source code for debugging proccess.

Mark the Is Library Option by Right Clicking the project > Propertie > Android

Then go to all the library projects that uses that library, and Right Click the project > Propertie > Android > Add > and select your library.

Then, go to your project and the library project that is in the Project>Properties>Android>Library_name, click remove and add it again, in order to be able to assume the changes in the library project.

And that's all. It's just use the project of the library itself instead of just using the jar of the library you want to see the source code.

For any question with helping you to implement this, just write to me.

like image 44
Sterling Diaz Avatar answered Sep 30 '22 17:09

Sterling Diaz