错误:程序类型已存在:android.support.v13.view.DragAndDropPermissionsCompat

时间:2018-10-08 15:30:42

标签: android gradle android-gradle

将其上传到智能手机时没有出现错误,但是尝试创建apk文件时出现错误 error

Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives

Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete

Caused by: com.android.tools.r8.utils.AbortException

程序类型已存在:

android.annotation.SdkConstant$SdkConstantType
Message{kind=ERROR, text=Program type already present: android.annotation.SdkConstant$SdkConstantType, sources=[Unknown source file], tool name=Optional.of(D8)}

这是我的礼物

build.gradle(Module:app)

apply plugin: 'com.android.application'

allprojects {
    repositories {
        mavenCentral()
        maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots/'
        }
        maven { url 'https://jitpack.io' }

    }
}

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId ""
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled true //Add this
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

dependencies {

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'gun0912.ted:tedpermission:2.2.0'
    implementation 'com.google.firebase:firebase-database:11.0.4'
    implementation 'com.google.firebase:firebase-storage:11.0.4'
    implementation 'com.google.firebase:firebase-auth:11.0.4'
    implementation 'com.github.satyan:sugar:1.5'
    implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation('com.naver.nid:naveridlogin-android-sdk:4.2.0')
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.0.2-alpha3'
    implementation 'com.github.rey5137:material:1.2.5'
    implementation 'com.android.support:gridlayout-v7:27.1.1'
    implementation 'com.klinkerapps:android-smsmms:5.0.1'
    implementation 'us.belka:androidtoggleswitch:1.2.2'
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
    implementation 'com.github.iammert:ExpandableLayout:1.4.1'
    api('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    implementation project(':library')
    implementation 'com.klinkerapps:logger:1.0.3'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    annotationProcessor 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.github.bootpay:client_android_java:2.0.10'

}



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

bulud.gradle(项目:)

//顶层构建文件,您可以在其中添加所有子项目/模块共有的配置选项。

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:3.1.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

由于mms传输问题,我无法获得更高的版本

0 个答案:

没有答案