简体   繁体   English

如何解决转换为Dalvik格式失败并出现错误

[英]How to solve the Conversion to Dalvik format failed with error

I've developed an app. 我已经开发了一个应用程序。 and when I tried to run it says "Conversion to Dalvik format failed with error 1 " 当我尝试运行它时,提示"Conversion to Dalvik format failed with error 1

I've tried at some solutions given in Stackoverflow here. 我在这里尝试了Stackoverflow中给出的一些解决方案。

  1. Ensuring there is no duplicate jars 确保没有重复的罐子
  2. changing the proguard message 更改保护者信息

and still its the same.. is there any other solution for this? 还是一样..还有其他解决方案吗? and why does this error occurs ? 为什么会出现此错误?

This error has several causes, i unselect "Build Automatically" option, from Project -> Build Automatically, Then clean the project and Build all. 此错误有多种原因,我从“项目”->“自动构建”中取消选择“自动构建”选项,然后清理项目并全部构建。

But read this, it worked for me: 但是请阅读以下内容,它对我有用:

http://viktorbresan.blogspot.com.tr/2012/10/conversion-to-dalvik-format-failed-with.html http://viktorbresan.blogspot.com.tr/2012/10/conversion-to-dalvik-format-failed-with.html

The fix would be the following: you need to add !code/allocation/variable string to your -optimizations command in ProGuard config file. 解决方法如下:您需要在ProGuard配置文件的-optimizations命令中添加!code / allocation / variable字符串。 Mine looks like the following: 我的看起来像这样:

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable

转到项目,然后取消选中“自动生成”。然后尝试导出项目,错误消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android项目:转换为Dalvik格式失败,错误1 - Android project: Conversion to Dalvik format failed with error 1 在Mac上的Eclipse上,转换为Dalvik格式失败,并出现错误1 - Conversion to Dalvik format failed with error 1 on Eclipse for Mac 转换为Dalvik格式失败,并在libgdx中出现错误1奇怪的错误 - Conversion to Dalvik format failed with error 1 Weird error in libgdx Android Grid View转换为Dalvik格式失败错误 - Conversion to Dalvik format failed error for Android Grid View 获取错误:转换为Dalvik格式失败:无法执行dex: - Getting Error: conversion to Dalvik format failed: Unable to execute dex: 在编译jitsi项目时,转换为Dalvik格式失败,错误1 - Conversion to Dalvik format failed with error 1 while compiling jitsi project 自facebook SDK以来,转换为Dalvik格式失败,错误1 - Conversion to Dalvik format failed with error 1 since facebook SDK PhoneGap条码扫描器插件未导出,原因是“转换为dalvik格式失败,错误为1” - PhoneGap barcodeScanner plugin not exporting due to “conversion to dalvik format failed with error 1” 转换为Dalvik格式失败,并在Android中出现错误Apache poi - Conversion to Dalvik format failed with error Apache poi in Android 转换为Dalvik格式失败65536限制 - Conversion to Dalvik format failed 65536 limit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM