android - 多个 dex 文件定义 Lcom/google/api/client/googleapis/GoogleUtils - 在 Android Studio 项目中

标签 android android-studio

无法弄清楚为什么我在尝试运行应用程序时一直收到此错误(编译正常)

com.android.dex.DexException: Multiple dex files define Lcom/google/api/client/googleapis/GoogleUtils;

从上面的堆栈跟踪我可以说它停止在:

/Users/jacek/Documents/GoW/myapp/build/pre-dexed/debug/support-v4-19.1.0-d45e513079f821d0bdcba2b3c444c8362d798113.jar

我认为它要生成的下一个库是一个副本,但很难说它是什么...

这是我的依赖项:

依赖关系{

    compile project(':pixlUI')
    compile project(':gowEndpoint')
    compile project(':messageEndpoint')
    compile 'com.google.android.gms:play-services:4.3.23'
    compile 'com.android.support:appcompat-v7:19.1.+'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.jakewharton:butterknife:4.0.1'
    compile 'joda-time:joda-time:2.1'
    compile 'commons-lang:commons-lang:2.4'
    compile 'commons-io:commons-io:2.4'
    compile files('libs/google-api-client-1.16.0-rc.jar')
    compile files('libs/google-api-client-android-1.16.0-rc.jar')
    compile files('libs/google-http-client-1.16.0-rc.jar')
    compile files('libs/google-http-client-android-1.16.0-rc.jar')
    compile files('libs/google-http-client-gson-1.16.0-rc.jar')
    compile files('libs/google-http-client-jackson-1.16.0-rc.jar')
    compile files('libs/google-http-client-jackson2-1.16.0-rc.jar')
    compile files('libs/google-oauth-client-1.16.0-rc.jar')
    compile files('libs/jackson-core-2.1.3.jar')
    compile files('libs/jackson-core-asl-1.9.11.jar')
    compile files('libs/jsr305-1.3.9.jar')
}

最佳答案

经过一些尝试错误我想通了

compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')

是重复的

关于android - 多个 dex 文件定义 Lcom/google/api/client/googleapis/GoogleUtils - 在 Android Studio 项目中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22881773/

相关文章:

Android 虚拟设备/Android 模拟器 - 解密失败

安卓工作室 :JNI DETECTED ERROR IN APPLICATION: native code passing in reference to invalid local reference: 0x200001

android - PdfRenderer 无法访问受密码保护的 pdf

Android数据绑定(bind)产生 "Source folders generated at wrong location"

java - 读取下载的文本文件 - FileNotFoundException

javascript - 不变违规 : requireNativeComponent: "BVLinearGradient"

java - 应用程序的 map 在请求权限后首次运行时保持空白,但在关闭并重新打开后可以正常工作

android - 无法解析符号 'MultiDex'

android - Monkey Runner 导入出错

java - 使用 setContentUrl() 从 Android 在 Facebook 上共享