使用 Eclipse 将 jar 包含到 apk 中 [英] Include jar into apk with eclipse
本文介绍了使用 Eclipse 将 jar 包含到 apk 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的 apk 文件中包含一个 jar 文件.
I am trying to include a jar file in my apk file.
我尝试了以下方法:
- 将 jar 复制到我的项目中的
lib
目录 - 将 jar 添加到路径
- 启用 jar 以进行导出
- 将 jar 复制到我的项目中的
- 只需将 jar 添加到我的项目路径(其他任何位置)
- 启用 jar 以进行导出
但是apk不包括jar.当我尝试启动应用程序时,控制台告诉我:
But the apk does not include the jar. When I try to lanch the application the console tells me:
Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
Please check logcat output for more details.
Launch canceled!
我正在为 Java 开发人员使用
I'm using
Eclipse IDE版本:Indigo Service Release 1构建 ID:20110916-0149
Eclipse IDE for Java Developers Version: Indigo Service Release 1 Build id: 20110916-0149
和
Android 开发工具包版本:16.0.1.v201112150204-238534
Android Development Toolkit Version: 16.0.1.v201112150204-238534
这个问题解决了.如果我没有在清单中根据需要声明库,它就可以工作.(奇怪的行为)
This problem is solved. If I don't declare the libary as needed in the manifest it works. (Strange behaviour)
推荐答案
确保您的 .JAR
是使用 JavaSE-1.6 而不是 1.7
这篇关于使用 Eclipse 将 jar 包含到 apk 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文