java - 如何删除 Android 开发的 Eclipse/bin/dexedLibs 文件夹中出现的重复库?

标签 java android eclipse

我已经多次看到此错误报告,但我读过的解决方案似乎都没有帮助我。我收到以下错误:

Dex Loader] Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint;

我做了一些挖掘,我在/bin/dexedLibs 文件夹中看到了这些 jar 文件:

android-support-v4-198bc014c99a20da45e22ed9cbf6acfc.jar
annotations-548f83e84eb7d75caedbdd94af586669.jar
annotations-c206a845ecee15ca74bd8ea29f715ccd.jar
google-play-services-90fd245eca6bf1f2b0d2bb25ec3948cc.jar
google-play-services_lib-6007bc6f3ac755b4866fa4a11c4e1704.jar
guice-3.0-no_aop-12e0ac277316bccd821359aa41181ed8.jar
javax.inject-384e1baadfa688e537ac642df7b9e932.jar
jsr305-1.3.9-13c6c964842f2bc7643c588e6fdc4754.jar
ormlite-android-4.47-185a20bcc9d996b5de6d6ca2aff0d0d5.jar
ormlite-core-4.47-42acd47179ed45763a3ec81ac92a2f20.jar
roboguice-2.0-f9de91c4687c33313255e5dd6fd324b3.jar
simple-xml-2.7.1-d80fa5a8427ec77885976924091eb340.jar
teklibrary-core-1.0.0-SNAPSHOT-cd7381a5468da36c532837d7604e95b3.jar

查看重复的注释google_play_services jar 文件。这就是我的 eclipse 的样子。我不知道 Google Play ServicesAnnotations 如何同时出现在 Android 私有(private)库Android 依赖项 中。

enter image description here

这是我的 Google Play 服务 添加到项目的地方。我以这种方式添加它的原因是由于 AndroidManifest.xml 中的以下代码行存在问题,其中 @integer/google_play_services_version 未被识别。

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

enter image description here

在项目属性中| Java 构建路径 |订单和导出,我未选中 Android 依赖项

enter image description here

<小时/>

问题来了,谁知道如何解决这个问题:

[2013-11-29 10:30:49 - TekJobsAppAndroid2] Dx 
trouble writing output: already prepared
[2013-11-29 10:30:49 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint;
[2013-11-29 10:30:49 - TekJobsAppAndroid2] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/annotation/SuppressLint;

提前致谢

请注意,我始终如一地执行以下操作:

  • 删除BIN文件夹的内容
  • 清洁项目
  • 构建项目

最佳答案

打开 Java 构建路径 -> 打开库选项卡 -> 全部展开 -> 查找重复项 -> 删除它们。

删除 Bin 文件夹。 清洁项目

关于java - 如何删除 Android 开发的 Eclipse/bin/dexedLibs 文件夹中出现的重复库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20289312/

相关文章:

java - 如何在 Angularjs 中使用 Spring Controller 的响应对象

java - hashtable类中的方法需要返回Enumeration类型

java - 安卓工作室 : Json Parsing loads only 10 objects out of 50 that exists in the URL

android - 单击按钮后,Android应用程序崩溃

javascript - 如何使用sendkeys生成增量版本号

linux - Yocto Eclipse ADT 插件在配置期间失败

java - 如何找回eclipse中删除的项目

java - 有没有办法手动损坏文件?

java - 在没有 Spring 的情况下使用 AspectJ 日志记录

javascript - Android 4.3 上使用 Phonegap 中的 FileTransfer 将文件上传到 S3 时的代码 3