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

问题描述

这瞬间发生的,当我做Eclipse的一个新项目。

我只有在项目1 jar文件,我试图将其删除,并重新添加了几次,并清理项目之后。

我已经更新ProGuard的(我认为),下载的新版本,并取代了lib文件夹作为此线程说。

我的 default.properties 的文件看起来是这样的:

 #此文件是由Android的工具自动生成的。
#不要修改这个文件 - 您所做的更改都将被删除!
#
#这个文件必须在版本控制系统进行检查。
#
#要自定义使用Ant构建系统的使用特性,
#build.properties,并覆盖值,以适应脚本您
#项目结构。

#项目的目标。
目标=机器人-8
 

所以无法评论关于这也是在另一个线程中提到ProGuard的东西。我觉得我已经尝试了一切,还是这个bug。有一件事我注意到,虽然如果我去:窗口 - > preferences - > Android的 - >建。而取消选中的强制错误时,外部罐包含本地库的。然后我得到:无法解析R的,而不是在Dalvik误差

没有名为进口 android.R 或者

任何人只要有一些帮助吗?

解决方案

这看起来并不像问题ProGuard的,因为它甚至不是在你的 defaults.properties 的文件中启用。请尝试以下操作:

  1. 取消勾选​​的选项(就像你)
  2. 在外部罐包含本地库力误差
  3. 选择项目 - >清除...从菜单中
  4. 如果这不会帮助确保您已导入正确的R舱。正如在 source.android.com

    看一看也是在这个版本:"转换到的Dalvik格式失败,错误1"外部罐
    请检查下面的答案(链接将直接回答):

    • michel's回答
    • user408841's回答
    • Mido's回答
    • Joe's应用程序的回答

    This happens instantly when I make a new project in Eclipse.

    I only have 1 jar file in the project, I have tried to remove it, and add it again, several times, and cleaned the project after this.

    I have updated ProGuard (I think), downloaded the new version, and replaced the lib folder as the threads on here said.

    My default.properties file looks like this:

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must be checked in Version Control Systems.
    #
    # To customize properties used by the Ant build system use,
    # "build.properties", and override values to adapt the script to your
    # project structure.
    
    # Project target.
    target=android-8
    

    So can't comment anything about ProGuard which was also mentioned in another thread.I feel I have tried everything, and still this bug.One thing I have noticed though if I go to:window -> preferences -> android -> build. And uncheck "Force error when external jars contain native libraries". Then I get: "Can't resolve R" instead of the Dalvik error.

    There is no import named android.R either.

    Anyone with some help please?

    解决方案

    This doesn't look like the issue with proguard, since it's not even enabled in your defaults.properties file. Try the following:

    1. Uncheck "Force error when external jars contain native libraries" option (just as you did)
    2. Select "Project -> Clean…" from the menu
    3. If that won't help ensure you have the correct R class imported. As stated at source.android.com:

      Have a look also at this thread: "Conversion to Dalvik format failed with error 1" on external Jar.
      Check the following answers (link will bring you directly to the answer):

      这篇关于月蚀:转换为Dalvik的格式失败,错误1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-09 20:46