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

2022-09-01 03:29:45

我将Android工作室更新到3.1,更新后出现此错误:

 Program type already present: android.support.v13.view.DragAndDropPermissionsCompat
    Message{kind=ERROR, text=Program type already present: android.support.v13.view.DragAndDropPermissionsCompat, sources=[Unknown source file], tool name=Optional.of(D8)}

org.gradle.api.tasks.TaskExecutionException: 执行失败的任务 ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

Caused: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException

由以下原因导致:com.android.tools.r8.CompilationFailedException: 编译未能完成>

 org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\0.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\1.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\2.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\3.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\4.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\5.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\6.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\7.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\10.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\11.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\12.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\14.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\28.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\29.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\30.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\31.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\32.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\33.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\34.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\35.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\36.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\37.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\38.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\39.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\40.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\41.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\42.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\43.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\44.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\45.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\46.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\48.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\49.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\50.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\51.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\52.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\53.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\54.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\55.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\56.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\57.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\58.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\59.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\60.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\62.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\63.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\64.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\65.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\66.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\70.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\71.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\72.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\73.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\83.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\84.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\85.jar
    at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    ... 32 more
Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\0.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\1.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\2.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\3.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\4.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\5.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\6.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\7.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\10.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\11.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\12.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\14.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\28.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\29.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\30.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\31.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\32.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\33.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\34.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\35.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\36.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\37.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\38.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\39.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\40.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\41.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\42.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\43.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\44.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\45.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\46.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\48.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\49.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\50.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\51.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\52.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\53.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\54.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\55.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\56.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\57.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\58.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\59.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\60.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\62.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\63.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\64.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\65.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\66.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\70.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\71.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\72.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\73.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\83.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\84.jar, D:\ISLaMiC\SoBhY\Sho8l\amira\aaa\app\build\intermediates\transforms\dexBuilder\debug\85.jar
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:124)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:109)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
    at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:123)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
    ... 48 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
    at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:76)
    at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:45)
    at com.android.tools.r8.D8.run(D8.java:88)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:107)
    ... 53 more
Caused by: com.android.tools.r8.utils.AbortException
    at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:77)
    at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:58)
    at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:67)
    ... 56 more



apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.amira.amira.amira"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '27.0.3'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.google.firebase:firebase-storage:12.0.0'
    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.1.0'
    implementation 'com.google.firebase:firebase-auth:12.0.0'
    implementation 'com.google.firebase:firebase-database:12.0.0'
    implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
    implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
    implementation 'com.appeaser.sublimepickerlibrary:sublimepickerlibrary:2.1.1'
    implementation 'com.github.yukuku:ambilwarna:2.0.1'
    implementation 'com.wdullaer:materialdatetimepicker:3.5.1'
    implementation 'com.hbb20:ccp:2.1.4'
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'com.bignerdranch.android:recyclerview-multiselect:0.2'
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.github.clans:fab:1.6.4'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.github.yalantis:ucrop:2.2.1'
}
apply plugin: 'com.google.gms.google-services'

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

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

答案 1

在 gradle 文件的依赖项中配置它

    configurations {
    all*.exclude group: 'com.android.support', module: 'support-v13'
    }

例如:-

dependencies {

    configurations {
    all*.exclude group: 'com.android.support', module: 'support-v13'
    }
    //dependencies.....
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
}

答案 2

首先,您必须检查模块 build.gradle 中是否存在重复的依赖项。如果在项目中运行以下行(在本例中,应用是模块名称):

如果您使用的是 Linux

./gradlew app:dependencies

或者如果您使用的是 Windows,请使用以下命令

gradlew app:dependencies

您可以看到依赖项树并检查那里的重复库。

以下依赖项使用旧版本的支持库:

implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
implementation 'com.appeaser.sublimepickerlibrary:sublimepickerlibrary:2.1.1'

因此,您需要从中排除支持库。

然后,您还具有重复的依赖项行。

您的 build.gradle 依赖项应如下所示:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    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.constraint:constraint-layout:1.0.2'
    // support design implicitly using appcompat-v7 and support-v4
    //implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.android.support:support-annotations:27.1.0'
    implementation 'com.android.support:gridlayout-v7:27.1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.0'


    implementation 'com.google.firebase:firebase-storage:12.0.0'
    implementation 'com.google.firebase:firebase-auth:12.0.0'
    implementation 'com.google.firebase:firebase-database:12.0.0'

    implementation ('com.soundcloud.android:android-crop:1.0.1@aar') {
         exclude group: 'com.android.support'
         exclude module: 'support-annotations'
         exclude module: 'support-v4'
    }

    implementation ('com.github.dmytrodanylyk.android-process-button:library:1.0.4') {
         exclude group: 'com.android.support'
         exclude module: 'support-v4'
    }

    implementation 'com.appeaser.sublimepickerlibrary:sublimepickerlibrary:2.1.1') {
         exclude group: 'com.android.support'
         exclude module: 'appcompat-v7'
         exclude module: 'support-v4'
         exclude module: 'support-annotations'
         exclude module: 'gridlayout-v7'
    }

    implementation 'com.github.yukuku:ambilwarna:2.0.1'
    implementation 'com.wdullaer:materialdatetimepicker:3.5.1'
    implementation 'com.hbb20:ccp:2.1.4'
    implementation 'com.github.clans:fab:1.6.4'

    implementation ('com.bignerdranch.android:recyclerview-multiselect:0.2') {
         exclude group: 'com.android.support'
         exclude module: 'appcompat-v7'
         exclude module: 'recyclerview-v7'
    }


    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.github.yalantis:ucrop:2.2.1'
}

推荐