Java – The Jar file ../android-8/android.jar has no source attachment

androidjava

I came across this no source attachment problem when I was debugging the project, but when I run the android program without debugging enabled, the program would run without any trouble. Even after I attached the jar file manually, it still reported that properties.class could not be found! What should I do with this problem? What is the reason for this? thanks!!!

Daniel

Best Solution

In the debug mode your application try to go through all the sources. Some of these sources are come from parts of Android framework system (Android SDK) which has been built. Thus, they come to your system as a built files (there are no source files) and thus, when you try to step through a function from Android framework the system cannot find the sources of this function (but still you have binaries of this function).

To avoid this problem during the debug you can download and attach the sources of Android system or you can use Android Sources plugin (http://code.google.com/p/adt-addons/)