【问题标题】:Android: External Library and JAR Issue [duplicate]Android:外部库和 JAR 问题 [重复]
【发布时间】:2014-09-16 07:52:46
【问题描述】:

我在 Eclipse 中做了一个安卓计算器。

在我的程序中,我导入了folder1name.folder2name.file1namefolder1name.folder2name.file2name

我还添加了外部库(folder1/folder2/),其中包含我导入的类所需的 JAVA 文件(file2,file1)和 JAR 文件。

但是,当我尝试在模拟器上运行它时,它会在 LogCat 中出现错误。

我认为我添加库和 JAR 的方式有问题。

显示代码没有错误。

请帮我解决这个错误! 我使用 Eclipse Luna。

编辑:这是输出的最后 2 行(红线)。

[2014-07-25 09:23:00 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer$Format;
[2014-07-25 09:23:00 - OwnCode] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define             Lorg/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer$Format;

【问题讨论】:

  • 是的,请添加logcat
  • 让我们看到 Logcat 输出中的实际错误非常重要,是的。
  • 对不起!错误显示在控制台中,而不是 LogCat。我提供了控制台错误。

标签: java android eclipse


【解决方案1】:

试试这个- 选择项目,右键Build Path->Configure Build Path->Order and Export->取消勾选.jar文件

【讨论】:

    猜你喜欢
    • 2012-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-30
    • 2019-09-30
    • 1970-01-01
    • 2013-05-22
    相关资源
    最近更新 更多