添加到 Android 库的 jar 未在项目中引用

发布于 2024-12-28 04:47:42 字数 162 浏览 3 评论 0原文

我创建了一个 Android 库,其中包含一些外部 jar。这些 jar 可以在库项目下的“参考库”中看到。当我在其他项目中引用该库时,它无法链接已添加到库中的 jar。它显示项目下引用的库的错误。

它应该链接到库中添加的 jar,相反,它在我添加此库的项目中显示错误。谁能帮我解决这个问题吗?

I have created an Android library where I included some external jars. These jars are seen in "Referenced Libraries" under the library project. When I reference this library in my other project, it is not able to link the jars that had been added to library. It shows errors to the referenced library under the project.

It should have linked the jars which are added in library, rather, it shows an error in the project in which I have added this library. Can anyone help me figure this out?

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

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

发布评论

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

评论(3

白鸥掠海 2025-01-04 04:47:42

通过 Properties -> 从库项目导出 jar Java 构建路径 -> Order and Export 实际上在最后不起作用:Eclipse 能够编译依赖项目,但 jar 不会出现在最终的 apk 中,并且您会收到运行时异常。

Exporting jars from library project through the Properties -> Java Build Path -> Order and Export doesn't actually work at the end: Eclipse is able to compile a dependent project, but jars do not appear in the final apk and you get a runtime exception.

浅语花开 2025-01-04 04:47:42

如果您已正确包含库项目,请转到 Properties -> Java 构建路径 ->订购和导出并检查您希望包含在主项目中的所有 JAR。如果所有内容都在同一个工作区中,这应该可行。

If you've got your library project properly included, go to Properties -> Java Build Path -> Order and Export and check all the JARs you wish to include in your main project. This should work, if everything's in the same workspace.

此刻的回忆 2025-01-04 04:47:42

将文件复制到您的项目位置,可能在 lib 文件夹中。然后尝试添加库。

Copy the files to your project location, probably in a lib folder. Then try to add the library.

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