Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No source attachment error when debugging Android applications

I have just started doing Android development on Mac OS X in Eclipse. When debugging an Activity, I keep getting the following errors:

The JAR file /platforms/android-10/android.jar has no source attachment.

This is starting to get very annoying, does it mean something is throwing an exception somewhere? (the message itself does not give any meaningful information as to why this is happening) I do not want to step into the source; does Eclipse do this by default? How do I disable it?

like image 490
martijn_himself Avatar asked Jun 03 '11 15:06

martijn_himself


1 Answers

It looks like you have some error in your application. And Android subsystem throws exception. Normally, if such exception originates from android, you'll see this behavior.

What you should do:

  1. Turn on LogCat view to see logs.
  2. Launch your app without debugger (Ctrl+F11 on ubuntu/windows)
  3. Inspect those logs in LogCat very carefully. They will contain the place where exception happened (originating from your code). You will then easily be able to fix the issue yourself (or ask for more assistance if needed).

In a normal development workflow you shouldn't hit cases like yours too often. Its just the learning curve :) So stay calm and keep learning.

like image 124
inazaruk Avatar answered Sep 18 '22 06:09

inazaruk