“转换为 Dalvik 格式失败”错误不会消失
“转换为 Dalvik 格式失败:无法执行 dex:包装器未首先正确加载”
我在 Eclipse 中的项目中遇到此错误,我搜索了它,所有答案都说这是一个问题.jar 文件冲突,清理项目,它应该可以工作。库中只有一个 .jar 文件,清理它并不能使其消失。事实上,我清理了所有项目,这使得我的其他项目出现了同样的错误!自从上次成功运行我的项目以来,我还没有使用 Eclipse 做过任何事情。我去了商店,回来尝试再次运行它,并收到此错误。我下载了新华硕平板电脑的 OEM 驱动程序,但我不认为这样做了...它们仍然在我的下载文件夹中!发生了什么??
"Conversion to Dalvik format failed: unable to execute dex: wrapper was not properly loaded first"
I am getting this error with my project in eclipse, and I searched for it and all answers say it's a problem with .jar file conflicts, and to clean the project and it should work. There is only one .jar file in the library, and cleaning it didn't make it go away. In fact, I cleaned all projects, and it made the same error occur on my other projects!! I haven't done anything with Eclipse since the last time I successfully ran my project. I went to the store, came back and tried to run it again, and got this error. I downloaded OEM drivers for a new Asus tablet, but I don't think that did it... They're still in my downloads folder! What happened??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需尝试直接使用 DX 实用程序(从 JVM 转换)字节码到 Dalvik VM 字节码)而不是依赖 Eclipse。
因此,您将看到 DX 报告的内容 - .JAR 中的哪个类无法转换为 .dex 文件
Just try to use directly DX utility (converter from JVM bytecode to Dalvik VM bytecode) instead of relying upon Eclipse.
As a result you will see what DX reports - which class from your .JAR can't be converted to .dex file
试试这个,用户 Declan Shanaghy 发布的答案:
首先关闭 eclipse。然后在文本编辑器中打开 AndroidManifest.xml。删除uses-sdk元素,然后保存并退出编辑器。点燃日食。现在应该可以构建了。现在转到清单编辑器并在uses-sdk元素中输入您希望拥有的详细信息。
在此链接中阅读更多信息(我在那里得到了答案):
启动第一个测试应用程序时出错:Android 打包问题?
希望我可能有帮助:D
Try this, an answer posted by User 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.
Read more here in this link(Where I got the answer):
Error launching first test application: Android Packaging Problem?
Hope I could be of help :D
好吧,我不知道发生了什么事......我尝试了一大堆东西,并使“转换为dalvik格式失败”错误随机消失,但 java.lang.Object 仍然无法解决,因为AndroidManifest.XML 未同步。因此,我只是在工作区中创建了一个新项目,并复制了每个文件的所有文本,并且它起作用了。但是等等...原来的项目现在也可以运行了!这到底是怎么回事啊!
Okay, I have no clue what was going on.... I tried a whole bunch of stuff, and made the "Conversion to dalvik format failed" error go away randomly, but java.lang.Object still could not be resolved because the AndroidManifest.XML was not synced. So I just made a new project in the workspace and copied all the text for each file, and it worked. But wait.... The original project works now, too!! What in the world!