Unable to Debug Library Projects with ADT v14 - Source Not Found

前端 未结 7 1218
北海茫月
北海茫月 2021-02-05 02:49

Ever since upgrading my current projects to use the new R14 Tools in Eclipse, I\'m now unable to debug any code that exists in my library projects.

When I hit a break po

相关标签:
7条回答
  • 2021-02-05 03:26

    This problem also occurs with release 21 of ADT inside Juno. As a workaround, in the "debug" view of the debug perspective (where you see threads and method invocation traces), right click and edit source lookup path.

    0 讨论(0)
  • 2021-02-05 03:28

    Tried all of the above and it did not work for me, however the workaround detailed here did.

    http://code.google.com/p/android/issues/detail?id=20731

    1. Start debugging, and run until you hit a breakpoint (and precisely get a .class file instead of the .java you would like to have)
    2. Right click in the Debug view of the Debug perspective (for example on the call stack), and choose "Edit Source Lookup Path"
    3. Add all your projects above "Default", via "Add..." > "Java project" > "Select All"

    (I'm using ADT 15.0.2 preview from http://tools.android.com/download)

    0 讨论(0)
  • 2021-02-05 03:28

    I had the same problem in a project today. The project consists of an app which has two library dependencies. I could not see code during debugging and when using auto-completion when overriding methods Eclipse was unable to deduce proper argument names.

    First of all, the problem manifested itself by showing the the 'gen' folder was used as the one that contained the source. To check whether this is the same issue go to your app project, open the Android dependencies and have a look at the properties of the your library dependencies. Location path said /libraryprojectname/gen.

    If this is also your problem then go to the 'Order and Export' tab of each library project and move the 'gen' item below the 'src' item. As soon as you click OK Eclipse will work a bit and when you check the Android dependency properties the location path should say: /libraryprojectname/src. Open click the dependency and open any class inside the jar. It should show the source.

    I am using ADT plugin 20.0.3 with Android SDK Tools 20.0.3 and Android SDK Platform Tools 14.

    0 讨论(0)
  • 2021-02-05 03:32

    I assume you are opeining library project and there you put brakepoint. Try this: On main project open Library Projects->[yourlibrary.jar]->[yourfile.class] from Package Explorer, and then in .class file put brakepoints. This works for me at least :)

    0 讨论(0)
  • 2021-02-05 03:33

    Sometimes this happens to me. Not sure about the reason but the way I solve is:

    Remove the main project from eclipse. -- Closs Eclipse -- Delete the jar file in the library project -- Open Eclipse -- Wait for the library project to compile -- Import the main project

    0 讨论(0)
  • 2021-02-05 03:41

    The following worked for me on Eclipse Juno:

    In Project Properties/Java Build Path:

    • In the Projects tab, added my library projects.
    • In the Order and Export tab, moved my library projects to the top, and checked them

    Not sure if it's relevant, but Android SDK tools is rev 20.0.3 and Android SDK platform tools is 14.

    Good luck.

    0 讨论(0)
提交回复
热议问题