多个dex文件定义Lcom / google / android / gms / internal / zzim;

时间:2016-06-07 02:16:14

标签: android dependencies google-play-services

我的代码工作正常然后我突然收到错误

多个dex文件定义Lcom / google / android / gms / internal / zzim;

我环顾四周,看到它是因为多个依赖项使用相同的类,但没有任何改变,代码工作正常。

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.app.app.app"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

aaptOptions {
    noCompress 'png' , 'gif'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.flipboard:bottomsheet-core:1.5.0'
compile 'com.flipboard:bottomsheet-commons:1.5.0'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.facebook.fresco:fresco:0.9.0+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile files('libs/universal-image-loader-1.9.5.jar')
compile files('libs/cwac-provider-0.3.1.jar')
}

gradlew androidDependencies输出

google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used.
please apply google-services plugin at the bottom of the build file.
Incremental java compilation is an incubating feature.
:app:androidDependencies
debug
+--- LOCAL: cwac-provider-0.3.1.jar
+--- LOCAL: universal-image-loader-1.9.5.jar
 +--- com.google.android.gms:play-services-measurement:8.3.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-analytics:8.3.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:appcompat-v7:23.1.1
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-ads:8.4.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:design:23.1.1
|    +--- com.android.support:appcompat-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    +--- com.android.support:recyclerview-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:support-v4:23.1.1
|    \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-core:1.5.0
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-commons:1.5.0
|    +--- com.flipboard:bottomsheet-core:1.5.0
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.android:audience-network-sdk:4.12.1
|    +--- com.android.support:appcompat-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    +--- com.google.android.gms:play-services-ads:8.4.0
|    |    \--- com.google.android.gms:play-services-basement:8.4.0
|    |         \--- com.android.support:support-v4:23.1.1
|    |              \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:recyclerview-v7:23.1.1
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fresco:0.9.0
 +--- com.facebook.fresco:drawee:0.9.0
 |    +--- com.android.support:support-v4:23.1.1
 |    |    \--- LOCAL: internal_impl-23.1.1.jar
 |    \--- com.facebook.fresco:fbcore:0.9.0
 +--- com.facebook.fresco:fbcore:0.9.0
 \--- com.facebook.fresco:imagepipeline:0.9.0
      +--- com.android.support:support-v4:23.1.1
      |    \--- LOCAL: internal_impl-23.1.1.jar
      +--- com.facebook.fresco:fbcore:0.9.0
      \--- com.facebook.fresco:imagepipeline-base:0.9.0
           +--- com.android.support:support-v4:23.1.1
           |    \--- LOCAL: internal_impl-23.1.1.jar
           \--- com.facebook.fresco:fbcore:0.9.0

debugAndroidTest
No dependencies

debugUnitTest
No dependencies

release
+--- LOCAL: cwac-provider-0.3.1.jar
+--- LOCAL: universal-image-loader-1.9.5.jar
+--- com.google.android.gms:play-services-measurement:8.3.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-analytics:8.3.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:appcompat-v7:23.1.1
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-ads:8.4.0
|    \--- com.google.android.gms:play-services-basement:8.4.0
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:design:23.1.1
|    +--- com.android.support:appcompat-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    +--- com.android.support:recyclerview-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:support-v4:23.1.1
|    \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-core:1.5.0
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-commons:1.5.0
|    +--- com.flipboard:bottomsheet-core:1.5.0
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:support-v4:23.1.1
|         \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.android:audience-network-sdk:4.12.1
|    +--- com.android.support:appcompat-v7:23.1.1
|    |    \--- com.android.support:support-v4:23.1.1
|    |         \--- LOCAL: internal_impl-23.1.1.jar
|    +--- com.google.android.gms:play-services-ads:8.4.0
|    |    \--- com.google.android.gms:play-services-basement:8.4.0
|    |         \--- com.android.support:support-v4:23.1.1
|    |              \--- LOCAL: internal_impl-23.1.1.jar
|    \--- com.android.support:recyclerview-v7:23.1.1
|         \--- com.android.support:support-v4:23.1.1
|              \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fresco:0.9.0
 +--- com.facebook.fresco:drawee:0.9.0
 |    +--- com.android.support:support-v4:23.1.1
 |    |    \--- LOCAL: internal_impl-23.1.1.jar
 |    \--- com.facebook.fresco:fbcore:0.9.0
 +--- com.facebook.fresco:fbcore:0.9.0
 \--- com.facebook.fresco:imagepipeline:0.9.0
      +--- com.android.support:support-v4:23.1.1
      |    \--- LOCAL: internal_impl-23.1.1.jar
      +--- com.facebook.fresco:fbcore:0.9.0
      \--- com.facebook.fresco:imagepipeline-base:0.9.0
           +--- com.android.support:support-v4:23.1.1
           |    \--- LOCAL: internal_impl-23.1.1.jar
           \--- com.facebook.fresco:fbcore:0.9.0

releaseUnitTest
No dependencies

0 个答案:

没有答案