“转换为 Dalvik 格式失败,错误 1"-- 仅限出口 [英] "Conversion to Dalvik format failed with error 1" -- on export only

查看:26
本文介绍了“转换为 Dalvik 格式失败,错误 1"-- 仅限出口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个重复的问题,但我已经阅读并尝试了本网站上的所有解决方案,但仍然出现错误;另外,只有当我从 Eclipse 导出我签名的 apk 时,我才会得到它.我能够构建和运行未签名的 apk.

I know this is a repeat question but I've read and tried every solution on this site and I'm still getting the error; also, I'm getting it ONLY when I export my signed apk from Eclipse. I'm able to build and run the unsigned apk.

我有:

  • 从构建路径中删除(然后恢复)所有库
  • 清理并重建了我所有的项目
  • 使用 -clean 选项重新启动 Eclipse
  • 从头开始重新创建应用项目

我知道错误 1 ​​意味着我有重复的符号,但我已经检查、清理和重建了我的构建路径一百万次,但仍然出现错误,仅在我导出时.

I know error 1 means I have duplicate symbols but I've checked, clean and rebuilt my build path a million times and I still get the error, only when I export.

  • 如果我有重复的符号,我的未签名 apk 是否也会收到错误 1?
  • 如果我确实有重复的符号,我如何让 Eclipse 告诉我它们是什么?我从导出向导中得到的只是一个单行错误对话框.:(
  • 手动签署 apk 时没有出现任何错误,但在手机上安装它时出现一个简单的错误:未安装应用程序.":(:(

我的项目结构如下:

  1. 一个包含我 99% 代码的 Android 库项目.它在构建路径中有一份所需 jar 文件的副本.
  2. 一个包含两个类的 Android 应用项目.它通过 Android 选项卡引用库项目,而不是 Java 构建路径.除了 Android 2.1 之外,构建路径中没有引用其他源、项目或库.我什至从头开始重新创建了这个项目(我没有重新创建库项目,因为它要大得多).

几天前一切正常!非常感谢任何建议!

Everything was working a few days ago! Any suggestions are much appreciated!

提前致谢...

EDIT-UPDATE: 当我禁用 Proguard 时错误消失.很奇怪.

EDIT-UPDATE: The error goes away when I disable Proguard. Very strange.

推荐答案

这是 Windows 开发人员工具中 Proguard 的问题 - 编辑 Android SDK\tools\proguard\bin\Proguard.bat

This is an issue with Proguard in the Windows developer tools - edit Android SDK\tools\proguard\bin\Proguard.bat

替换:

call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %*

与:

call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

保留对此解决方案的引用,因为下次您更新 SDK 工具时,它可能会重新引入(在最近的几个版本中已存在).

Keep a reference to this solution because next time you update the SDK tools it'll probably be reintroduced (has been present in last few releases).

这篇关于“转换为 Dalvik 格式失败,错误 1"-- 仅限出口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆