图书馆项目支持吗?

发布于 2024-09-25 12:24:26 字数 455 浏览 8 评论 0原文

我一直在尝试使用图书馆项目,就像文档中提到的那样: http://developer.android.com/guide/developing/eclipse-adt.html

我已将我的库项目创建为 Android 1.6 项目,现在我一直在尝试从我的第二个项目(也是 Android 1.6 项目)中引用它,但出现以下错误: “目标‘Android 1.6’不支持使用库构建项目。” “错误:未知选项‘--auto-add-overlay’”

文档指出支持的平台是 1.5 及以上(2.0 和 2.0.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 !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

叫嚣ゝ 2024-10-02 12:24:26

库项目是如何编译的?它是一个jar文件吗?并且在 Eclipse 中,您是否将其添加到 Eclipse 中作为“项目名称”->右键单击->配置构建路径->图书馆。单击“添加外部 jars”并添加您的 jar 文件。

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.

叫思念不要吵 2024-10-02 12:24:26

首先重申一下之前评论中所说的。Android

术语中的“库项目”不仅仅是一个依赖项目或外部 jar。这是 Android 团队引入的 Android 概念,请参见下文...

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

老虎,您找到解决方法了吗?

我遇到了完全相同的问题,经过一段时间的斗争,现在我很确定这是一个错误(但这个特定的错误很旧,可能看起来非常相似)看看:

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

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

黄昏下泛黄的笔记 2024-10-02 12:24:26

是的,Linux 中的某些 SDK 级别似乎不支持在 Eclipse 中使用库时所需的“--auto-add-overlay”选项。我发现 1.6 可以找到,2.1-update1 也可以,但 2.0 失败。我最终将我的应用程序更改为依赖 2.1 而不是 2.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文