1

I have been trying to work with a Library Project, just like it's mentioned in the documentation : http://developer.android.com/guide/developing/eclipse-adt.html

I have created my Library Project as a Android 1.6 Project and now I have been trying to reference to it out of my second project (also an Android 1.6 project) and I am getting the following error : "Target 'Android 1.6' does not support building project with libraries." "ERROR: Unknown option '--auto-add-overlay'"

The documentation states that supported platfroms are the 1.5 onwards (with exception for the 2.0 & 2.0.1) and that the second project should have the same platform or higher (in my case the same)...

So any idea what's ahppening here ? And most importantly : any idea how to solve this ? Thx in advance !

TiGer
  • 5,879
  • 6
  • 35
  • 36

3 Answers3

0

How is the library project compiled as? is it a jar file? And in eclipse, did you add it in Eclipse as "Project Name" -> Right click -> Configure build path -> Libraries. Click on Add External jars and add your jar file.

omermuhammed
  • 7,365
  • 4
  • 27
  • 40
  • it is NOT compiled, as stated in my question it's a Library Project... Thats a specific Android functionality with which it is possible to create a project which can be used as an external library... This livrary does not get compiled per se, but is compiled when a projet using it gets compiled...Also I did include the project succesfully, thats not the problem... – TiGer Oct 04 '10 at 06:22
  • If it is compiled when the project using it is compiled, make it a dependent project in Eclipse? Did you try that? – omermuhammed Oct 04 '10 at 16:29
0

First of all to reiterate what was said in the previous comment..

A "Library Project" in Android terms is not just a dependent project or an external jar. It is an Android concept introduced by the Android team see below...

http://developer.android.com/guide/developing/eclipse-adt.html

Tiger, have you found a workaround to this yet?

I'm having exactly the same issue and after battling with this for a while now I'm pretty sure it's a bug (but this particular bug is quite old and might just look very similar) Have a look at:

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

Eurig Jones
  • 8,226
  • 7
  • 52
  • 74
0

Yes, it appears that certain SDK levels in Linux aren't supporting the "--auto-add-overlay" option required when using libraries in Eclipse. I've found that 1.6 works find, as does 2.1-update1, but 2.0 fails. I ended up changing my app to rely on 2.1 instead of 2.0 and it worked.

Tony Maro
  • 1,854
  • 17
  • 14