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

前端 未结 7 1233
北海茫月
北海茫月 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:44

    After having this issue as well and doing a little research, I came across this thread and another one that tipped me off. I was pulling my hair out already.

    It turns out that the problem is with the build order of your projects (mine was anyway). Since ADT/SDK v14 changed the way library projects are referenced, the build order needs to be correct. Make sure all of the libraries your app uses are built first. I just moved the "src" and "gen" folders for each of my projects to the bottom and now it builds the library first and I am able to debug it and view the source of my library files through the main project.

    In case someone doesn't know where to do this, in Eclipse, right click on your project and "Build Path" and then click "Configure Build Path". Then, on the "Order and Export" tab, move the two folders for your project to the bottom of the list below your libraries. I did this for all of my projects and the library projects.

    You can also do it globally in Eclipse from Windows->Preferences->General->Workspace->Build Order and moving your library projects to the top. I think the build order defined in each project will override this though, so you may want to do it in both places to solve the issue now and for future projects.

    I hope this is helpful to you and anyone else experiencing this annoying issue. :)

    Thanks, Ed

提交回复
热议问题