【问题标题】:"Conversion to Dalvik format failed" error not going away“转换为 Dalvik 格式失败”错误不会消失
【发布时间】:2011-07-27 02:55:50
【问题描述】:

"Conversion to Dalvik format failed: unable to execute dex: wrapper was not properly loaded first"

我在 Eclipse 中的项目中遇到此错误,我搜索了它,所有答案都说这是 .jar 文件冲突的问题,并且清理项目并且它应该可以工作。库中只有一个 .jar 文件,清理它并没有让它消失。事实上,我清理了所有项目,并且在我的其他项目上也出现了同样的错误!!自从我上次成功运行我的项目以来,我还没有对 Eclipse 做过任何事情。我去了商店,回来尝试再次运行它,并得到了这个错误。我为新的华硕平板电脑下载了 OEM 驱动程序,但我不认为这样做...它们仍在我的下载文件夹中!发生了什么事??

【问题讨论】:

    标签: android eclipse compiler-errors dx


    【解决方案1】:

    尝试直接使用DX utility(从JVM字节码到Dalvik VM字节码的转换器)而不是依赖Eclipse。

    因此,您将看到 DX 报告的内容 - .JAR 中的哪个类无法转换为 .dex 文件

    【讨论】:

      【解决方案2】:

      试试这个,用户 Declan Shanaghy 发布的答案:

      Firstly close eclipse. Then open AndroidManifest.xml in a text editor. Delete the uses-sdk element then save and exit the editor. Fire up eclipse. It should build ok now. Now go to the manifest editor and enter the details you wish to have in the uses-sdk element.

      在此链接中阅读更多信息(我在哪里得到答案): Error launching first test application: Android Packaging Problem?

      希望能帮到你:D

      【讨论】:

      • The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files activity.java 中的包名旁边出现错误。当我尝试打开 AndroidManifest.xml 时,它说资源与文件系统不同步。我想我可能只是从头开始构建项目!
      • 虽然很痛苦,但重新安装 Eclipse 通常会有所帮助。尝试保存现有项目并在全新安装后将其导入。
      【解决方案3】:

      好吧,我不知道发生了什么......我尝试了一大堆东西,并让“转换为 dalvik 格式失败”错误随机消失,但 java.lang.Object 仍然无法已解决,因为 AndroidManifest.XML 未同步。所以我只是在工作区中创建了一个新项目并复制了每个文件的所有文本,并且它起作用了。但是等等......原来的项目现在也可以工作了!!到底是什么!

      【讨论】:

        猜你喜欢
        • 2011-06-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多