:app:checkDebugDuplicateClasses Execute taskAction

今天把AS从2.3.3升为3.4.2后,导入项后发现报这个:app:checkDebugDuplicateClasses的错:

 

 

 

然后查看了日志,真是长篇大论,一头雾水

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:checkDebugDuplicateClasses'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:95)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:119)
	at org.gradle.api.internal.tasks.execution.ResolvePreviousStateExecuter.execute(ResolvePreviousStateExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:94)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:67)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
	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: com.android.ide.common.workers.WorkerExecutorException: 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class org.slf4j.ILoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.IMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Logger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.LoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$MDCCloseable found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Marker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventConstants found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventRecodingLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.Level found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.LoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.SubstituteLoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.FormattingTuple found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MarkerIgnoringBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MessageFormatter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NamedLoggerBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$ClassContextSecurityManager found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LocationAwareLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LoggerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MarkerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)

Go to the documentation to learn how to Fix dependency resolution errors.

	at com.android.ide.common.workers.ExecutorServiceAdapter.await(ExecutorServiceAdapter.kt:62)
	at com.android.build.gradle.internal.tasks.CheckDuplicateClassesDelegate.run(CheckDuplicateClassesDelegate.kt:71)
	at com.android.build.gradle.internal.tasks.CheckDuplicateClassesTask.taskAction(CheckDuplicateClassesTask.kt:61)
	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.StandardTaskAction.doExecute(StandardTaskAction.java:48)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:704)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:671)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:284)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:273)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:258)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:67)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:145)
	at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:49)
	at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
	at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
	at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
	at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:33)
	at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
	at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:43)
	at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:29)
	at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:134)
	at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$3(CacheStep.java:83)
	at java.util.Optional.orElseGet(Optional.java:267)
	at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
	at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:36)
	at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
	at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
	at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
	at java.util.Optional.map(Optional.java:215)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:91)
	... 35 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class org.slf4j.ILoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.IMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Logger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.LoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$MDCCloseable found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Marker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventConstants found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventRecodingLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.Level found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.LoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.SubstituteLoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.FormattingTuple found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MarkerIgnoringBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MessageFormatter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NamedLoggerBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$ClassContextSecurityManager found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LocationAwareLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LoggerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MarkerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)

Go to the documentation to learn how to Fix dependency resolution errors.
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
	at com.android.ide.common.workers.ExecutorServiceAdapter.await(ExecutorServiceAdapter.kt:56)
	... 80 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class org.slf4j.ILoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.IMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Logger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.LoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$MDCCloseable found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Marker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventConstants found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventRecodingLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.Level found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.LoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.SubstituteLoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.FormattingTuple found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MarkerIgnoringBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MessageFormatter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NamedLoggerBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$ClassContextSecurityManager found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LocationAwareLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LoggerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MarkerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)

Go to the documentation to learn how to Fix dependency resolution errors.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
	... 81 more
Caused by: java.lang.RuntimeException: Duplicate class org.slf4j.ILoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.IMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Logger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.LoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MDC$MDCCloseable found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.Marker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.MarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventConstants found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.EventRecodingLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.Level found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.LoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.event.SubstituteLoggingEvent found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMDCAdapter$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarker found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.BasicMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.FormattingTuple found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MarkerIgnoringBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.MessageFormatter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NOPMDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.NamedLoggerBase found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.SubstituteLoggerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$1 found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.helpers.Util$ClassContextSecurityManager found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LocationAwareLogger found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.LoggerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MDCAdapter found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)
Duplicate class org.slf4j.spi.MarkerFactoryBinder found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)

Go to the documentation to learn how to Fix dependency resolution errors.
	at com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable.run(CheckDuplicateClassesDelegate.kt:132)
	at com.android.ide.common.workers.ExecutorServiceAdapter$submit$submission$1.run(ExecutorServiceAdapter.kt:40)
	at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

然后查了超多资料,前前后差不多折腾了一天,试了各种各样的办法,都没有解决。。。。

然后我仔细看了这段日志,里面有句关键的话语:Duplicate class org.slf4j.IMarkerFactory found in modules slf4j-api-1.7.21.jar (org.slf4j:slf4j-api:1.7.21) and slf4j-api-1.7.21.jar (slf4j-api-1.7.21.jar)

大意就是说重复了。。。然后我就把libs文件夹下的这个slf4j-api-1.7.21.jar包删了(我这项目没有用到这个包,也不知道何时导入的,orz...)

删了这个jar包后,重新build了就可以了,搞了这么久,原来就删了这个jar包就可以了,这里记录一下吧Orz...

你可能感兴趣的:(Android)