Android 应用程序中未解析库项目中的 Jar
我正在构建一个 Android 应用程序,它使用在另一个 Eclipse 项目(同一工作区)中定义的库。一切工作正常,但现在我将一个 jar 文件添加到库项目的构建路径中。在 Eclipse 中,我导出了 jar 文件,使其对库的依赖项目可见(构建路径 -> 订单和导出 -> 标记 jar 文件)。 Eclipse (ADT) 仍然抱怨无法解决导入问题。 我还为该库设置了一个测试项目,如上所述导出 jar 文件后,导入是可见的。 有什么我忘记配置的吗?
问候, 马丁
I'm building an Android app which uses a library that is defined in another Eclipse project (same workspace). All is working fine, but now I added a jar file to the library project's build path. In Eclipse I exported the jar file to make it visible to dependent projects of the library (Build Path -> Order and Export -> mark the jar file). Still Eclipse (ADT) complains that the import cannot be resolved.
I have set up a test project for the library as well, and there the imports are visible after exporting the jar file as mentioned above.
Is there anything I forgot to configure?
Regards,
Martin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ADT 似乎没有自动选择它:-/
手动配置主项目的构建路径以依赖库项目的 jar 对我有用。
构建路径->图书馆 ->添加 JAR -> {库项目}\libs\myjar.jar
ADT doesn't seem to pick it up automatically :-/
Manually configuring the main project's build path to rely on the library project's jars worked for me.
Build Path -> Libraries -> Add JARs -> {Library Project}\libs\myjar.jar