1

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

enter image description here

Link added with the absolute path

enter image description here

When properties reopened again the link appears broken

enter image description here

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.

Maxim
  • 4,152
  • 8
  • 50
  • 77
  • As long as you have set `Is Library` in the `Project->Properties->Android`, all you need to do is then add that project in the same place under the new project. – techi.services May 17 '12 at 16:23
  • What "in the same place under the new project" does mean? Copy entire project into referencing project? Is any specific folder? It stoped to work after SDK update. – Maxim May 17 '12 at 16:31
  • Sorry if that wasn't clear. On the project that you want to have a reference to the library project, go to `Properties->Android`. There is a `Library` section where you can define the project as being a library or the libraries it references. – techi.services May 17 '12 at 16:34
  • That is how it was working until update happened. – Maxim May 17 '12 at 16:36
  • I haven't had any problems after 19. Are you compiling with Ant or Eclipse? Maybe clean your projects. – techi.services May 17 '12 at 16:40
  • With Eclipse. Seems tried everything. Thanks for trying to help. – Maxim May 17 '12 at 16:46
  • Have you tried removing the references and then re-adding them (clutching at straws, sorry). – techi.services May 17 '12 at 16:52

1 Answers1

0

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.

Community
  • 1
  • 1
yorkw
  • 40,926
  • 10
  • 117
  • 130
  • I use ADT to add a link and it creates absolute path for the link – Maxim May 17 '12 at 22:07
  • Probably because you use different logical disk, note that you are free to use Eclipse import different projects located under different logical disks in the same workspace, but this is something that ADT plugin doesn't really like. Honestly I don't know how to write a relative path point to some place under different logical disk. I think you have to move your library project into the same logical disk. – yorkw May 17 '12 at 22:19