【问题标题】:Error generating final archive: Found duplicate file for APK: LICENSE.txt生成最终存档时出错:找到 APK 的重复文件:LICENSE.txt
【发布时间】:2014-05-09 15:48:51
【问题描述】:

我正在尝试使用 jsHybugger 库 (www.jshybugger.com) 来调试一些 javascript - 但是 - 在尝试将开发版本部署到我的设备时,我看到以下错误:

注意:我使用的是 Eclipse

另外,对于包含 jsHybugger jar 的两个项目,这些是 .classpath 的:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry exported="true" kind="lib" path="libs/jshybugger-library-4.5.2.jar"/>
    <classpathentry exported="true" kind="lib" path="libs/gson-2.2.4.jar"/>
    <classpathentry exported="true" kind="lib" path="libs/httpmime-4.1.1.jar"/>
    <classpathentry exported="true" kind="lib" path="libs/icu4j-4_8_1_1.jar"/>
    <classpathentry exported="true" kind="lib" path="libs/signpost-core-1.2.1.1.jar"/>
    <classpathentry exported="true" kind="lib" path="libs/android-support-v4.jar"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
    <classpathentry exported="true" kind="lib" path="libs/twitter4j-core-3.0.5.jar"/>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>


<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry exported="true" kind="lib" path="/libs/jshybugger-library-4.5.2.jar"/>
    <classpathentry exported="true" kind="lib" path="/libs/urbanairship-lib-2.1.2.jar"/>
        <classpathentry kind="src" path="gen"/>
    <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
    <classpathentry exported="true" kind="lib" path="/libs/gson-2.2.4.jar"/>
    <classpathentry exported="true" kind="lib" path="/libs/httpmime-4.1.1.jar"/>
    <classpathentry exported="true" kind="lib" path="/libs/libGoogleAnalyticsV2.jar"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>

如您所见,不包含junit。

【问题讨论】:

  • 这两个项目有他们的license.txt吗?删除一个?
  • 整个项目由几个子项目组成。其中两个项目包括 jsHybugger 库。不幸的是,这些 LICENSE.TXT 文件在 jar 中 - 是否可以从 jar 中删除?
  • 我尝试使用本指南编辑 jar:wikihow.com/Edit-the-Contents-of-a-.Jar-File-on-a-Mac 然而,在构建项目时,Eclipse 抱怨 Conversion to Dalvik format failed with error 1
  • 我以为我很聪明,所以我在 junit.jar 上做了同样的过程,然而,Eclipse 再次抱怨 while parsing junit/junit/extensions/ActiveTestSuite$1.class ... Conversion to Dalvik format failed with error 1

标签: android eclipse


【解决方案1】:

我发现其中一个项目包括 junit :

所以我点击“删除”以摆脱 Junit 4。 这导致测试文件夹出错 - 我删除了该文件夹!

随后,我能够将项目部署到我的开发设备。

结论: 在 jsHybugger 删除“LICENSE.TXT”之前,似乎无法同时使用 Junit 和 jsHybugger

【讨论】:

  • LICENSE.txt 已重命名以防止名称冲突 (jsHybugger 4.5.3)
猜你喜欢
  • 2015-05-17
  • 1970-01-01
  • 2016-10-30
  • 2011-12-13
  • 1970-01-01
  • 2017-10-07
  • 2016-10-01
  • 2014-01-16
相关资源
最近更新 更多