我可以使用 Eclipse 和 ADT r14 来创建一个非基于 jar 的库项目吗?
我正在使用一个复杂的库,由于历史原因,该库被分成两个互相引用的 Android 库项目。在 SDK r14 之前,这工作得很好。每个人都只是引用对方的源代码。我们发布了一个jar,在Eclipse中,应用程序可以引用这两个库项目。
对于 r14,Eclipse 尝试为每个 jar 构建一个单独的 jar。由于每个都引用另一个,所以它们都失败了。可能有必要从这两个项目构建一个新的库项目。但这是开发工作,并且会带来其他问题。现在,我想指示 Eclipse 和 ADT 像以前一样处理它们,即不要从它们构建 jar,只是引用源代码。我一直在挖掘,但还没有找到方法。
预先感谢您的任何建议。
I am working with a complex library that, for historical reasons, is separated into two Android library projects that reference each other. Prior to r14 of the SDK, this worked fine. Each simply referred to the other's source code. We released a jar, and in Eclipse, applications could refer to the two library projects.
With r14, Eclipse tries to build a separate jar from each one. Since each references the other, they both fail. It may be necessary to construct a single new library project from the two. But that's development work and presents other problems. For now, I'd like to instruct Eclipse and ADT to handle them as before, i.e. not to build jars from them, just to reference the source. I've been digging, but I haven't yet found a way to do that.
Thanks in advance for any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
答案可能是否定的。我们使用源链接解决了这个问题,这极大地改善了问题。此机制不适用于以前的 ADT 版本。
The answer is probably no. We worked around it using source links, which improves matters tremendously. This mechanism didn't work with previous ADT versions.
另一个可行的解决方案是使用您使用 android maven 插件创建的 apklib 项目。
The other solution that would work is using apklib project that you create with the android maven plugin.