[英]Android project: Conversion to Dalvik format failed with error 1
I am writing an android application using eclipse and am trying to use jar files I generated from another eclipse (not android) project I wrote. 我正在使用eclipse编写android应用程序,并尝试使用从我编写的另一个eclipse(非android)项目生成的jar文件。 However, when I try to run my android application, I get the following error message:
但是,当我尝试运行我的android应用程序时,出现以下错误消息:
[2014-05-15 18:42:25 - ResearchNotebook] Dx 1 error;
[2014-05-15 18:42:25-ResearchNotebook] Dx 1错误; aborting
中止
[2014-05-15 18:42:25 - ResearchNotebook] Conversion to Dalvik format failed with error 1
[2014-05-15 18:42:25-ResearchNotebook]转换为Dalvik格式失败,错误为1
which is preceeded by a longer error message. 这是由较长的错误消息引起的。
I looked at the following question ( Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library ), and but am not sure how I would reconfigure the eclipse IDE so that rt.jar and android.jar are not being passed to dx. 我查看了以下问题( 在未构建核心库时,对核心类(java。*或javax。*)的不当使用或错误使用 ),但不确定如何重新配置eclipse IDE,以便使用rt。 jar和android.jar没有传递给dx。
However, I wrote non android java code within the same project using the jar and ran it in the console. 但是,我使用jar在同一项目中编写了非android java代码,并在控制台中运行了它。 It worked perfectly fine.
它工作得很好。 The problem only arises when I try to use the jar for the classes pertaining to the android application.
仅当我尝试将jar用于与android应用程序相关的类时,才会出现问题。
At this point, I have tried many different alternatives, including cleaning the project, deleting the jars from the buildpath and adding them again, and changing order and export according to the following site: http://tools.android.com/recent/dealingwithdependenciesinandroidprojects . 在这一点上,我尝试了许多不同的选择,包括清理项目,从构建路径中删除jar并再次添加它们,以及根据以下站点更改顺序和导出: http : //tools.android.com/recent/处理android项目中的依赖关系 。
Is there something else I should have done when generating the jar from my eclipse (non android) project? 从eclipse(非android)项目生成jar时,我还应该做其他事情吗? I have really hit a wall this problem and am at a loss about how to proceed.
我真的遇到了这个问题,对如何进行感到茫然。
Try the following: 请尝试以下操作:
Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.