我有一个带有两个Android应用程序和两个Android库的Eclipse工作区--Facebook SDK和我自己的库。当我尝试创建APK文件时,我有时会收到错误“转换为dalvik格式失败,错误1”。
我经历了所有类似问题的答案,但没有任何作用:
我找到的唯一解决方法是反复重试直到它工作。除了放弃Android并只做iOS和Windows Phone版本,我该怎么办?用这种方式开发任何东西是不可能的。
更新: 在其中一台计算机上,我得到了交替的错误,有时它是Dalvik错误,另一次它抱怨它无法导出... \ facebook-android-sdk-3.0 \ facebook \ bin \ facebooksdk.jar。
更新2: Eclipse日志(.metadata / .log)显示异常的详细信息:
!ENTRY com.android.ide.eclipse.adt 4 0 2013-04-12 00:14:59.163
!MESSAGE Export Wizard Error
!STACK 1
org.eclipse.core.runtime.CoreException: Conversion to Dalvik format failed with error 1
at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(ExportHelper.java:312)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(ExportWizard.java:296)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access$0(ExportWizard.java:233)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$1.run(ExportWizard.java:218)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.android.ide.eclipse.adt.internal.build.DexException: Conversion to Dalvik format failed with error 1
at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:751)
at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(ExportHelper.java:269)
... 4 more
!SUBENTRY 1 com.android.ide.eclipse.adt 4 0 2013-04-12 00:14:59.163
!MESSAGE Conversion to Dalvik format failed with error 1
!STACK 0
com.android.ide.eclipse.adt.internal.build.DexException: Conversion to Dalvik format failed with error 1
at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:751)
at com.android.ide.eclipse.adt.internal.project.ExportHelper.exportReleaseApk(ExportHelper.java:269)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.doExport(ExportWizard.java:296)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard.access$0(ExportWizard.java:233)
at com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard$1.run(ExportWizard.java:218)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
答案 0 :(得分:8)
为我工作导出签名的应用程序包