Reference to external project doesn't work

久未见 提交于 2019-12-11 11:56:12

问题


Since I updated android SDK tools to rev19 my external Library Projects discontinued to be visible by referencing projects. With new dependency behavior I moved jars to /libs folder which has fixed references with external jars.

Addining a link to the LIbProject

Link added with the absolute path

When properties reopened again the link appears broken

This link helped with external jars. http://tools.android.com/recent/dealingwithdependenciesinandroidprojects

This is literally what I'm getting, not with jars but Library Projects. http://code.google.com/p/android/issues/detail?id=27490

How to reference external projects now?

Edit:

Somehow reference to the Library Project is broken. From the referencing project I add link to a LibProject. Project->Properties->Android->Library->Add. When the lib project added, reopening properties shows that the link is broken. Projects are on different logical disks. If projects in a common root folder then linking works.


回答1:


Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:

  • Library project storage location

    There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.

Check out my answer here to see the screenshot examine how correct (by using relative path) and broken (by using absolute path) library reference links are shown in Properties window.



来源:https://stackoverflow.com/questions/10639467/reference-to-external-project-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!