多个dex文件定义Lcom / android / volley / toolbox / HttpStack;

时间:2018-04-10 05:40:06

标签: android android-volley multidex

  构建apk时出现

错误。这是我的完整的gradile文件,我不能   找到错误   这个错误来自我在emularor上运行这个应用程序在某些时候,而我正在尝试创建apk文件

android {
        compileSdkVersion 27
        buildToolsVersion '27.0.3'
        defaultConfig {
            multiDexEnabled true
            applicationId "com.norjimm.bingle"
            minSdkVersion 17
            targetSdkVersion 27
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            vectorDrawables.useSupportLibrary = true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }

        dexOptions {
            preDexLibraries = false
        }

    }

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:appcompat-v7:27.+'
        implementation 'com.android.support:support-v4:27.+'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.1'

        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
        implementation 'com.android.support:design:27.+'
        implementation 'com.android.support:cardview-v7:27.+'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        implementation 'com.android.volley:volley:1.0.0'
        implementation 'com.google.android.gms:play-services:11.8.0'
        implementation 'com.google.android.gms:play-services:11.8.0'
        implementation 'com.google.android.gms:play-services-location:11.8.0'
        implementation 'com.google.code.gson:gson:2.7'
        implementation 'com.roughike:bottom-bar:2.3.1'
        implementation 'de.hdodenhof:circleimageview:2.2.0'
        implementation 'com.mindorks:placeholderview:0.7.2'
        implementation 'com.codesgood:justifiedtextview:1.0.2'
        implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
        implementation 'com.github.myinnos:AlphabetIndex-Fast-Scroll-RecyclerView:1.0.8'
        implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
        implementation 'com.squareup.picasso:picasso:2.3.2'
        implementation 'com.rm:rmswitch:1.2.2'
        implementation 'com.facebook.fresco:fresco:1.1.0'
        implementation 'com.linchaolong.android:imagepicker:1.1'

        implementation 'com.facebook.android:facebook-login:[4,5)'

        implementation 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
        implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
        implementation 'com.hyman:flowlayout-lib:1.1.2'
        implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'

        implementation 'com.github.neurospeech:unofficial-linkedin-sdk-android:v1.1.4'

    }

1 个答案:

答案 0 :(得分:0)

只需从文件中删除此行:

    implementation 'com.android.volley:volley:1.0.0'

它与您在“ libs”文件夹中使用的jar冲突