Search code examples
androideclipsedalvikbreakpoints

Adding a breakpoint in Eclipse, causes Dalvik to crash


This is an interesting bug of Eclipse. I am using:

Version: Indigo Release
Build id: 20110615-0604

Out of nowhere today, I set a breakpoint in my android app on Eclipse. When it reaches the code, debug (dalvik JVM) aborts and crashes:

Tried to execute code in unprepared class (followed by the class name)

If I don't set the break point, it will run through with no problem. I have searched through Google but found nothing so far.

Another note, where I set this breakpoint does not matter, it could simply be the 1st line of onClick() function, or anywhere else. The moment the app "pauses" due to the breakpoint, it crashes.


Solution

  • I solved this issue by removing an unused import package.

    actually the error message is saying "tried to execute code in unprepared class" (followed by the class name)

    I am not using that class but it is imported.

    Simply remove the import, and it works fine ....