title: Duplicate classes error while building APK on Gradle
body: <p>I'm migrating my project to Gradle when I stumbled on this error: </p>
  
  <p><strong>Program type already present: com.google.android.maps.GestureDetector$GestureHandler</strong></p>
  
  <p>The project has 2 modules, 1 is the app, other is core. 
  In the app build.gradle, I import the module <code>core</code> and the <code>root /libs</code> (.jar that i used on the old project structure) while the core also needs the /libs dir.</p>
  
  <p><strong>app build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "28.0.3"
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 28
      }
  
      buildTypes {
          release {
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
  
          debug {
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: '*.jar', dir: "$rootProject.projectDir/libs")
      implementation project(':core')
  }
  </code></pre>
  
  <p><strong>core build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "28.0.3"
      publishNonDefault true
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
      }
  
      buildTypes {
          release {
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
  
          debug {
          }
      }
  }
  
  
  dependencies {
      implementation fileTree(include: '*.jar', dir: "$rootProject.projectDir/libs")
  }
  </code></pre>
  
  <p><strong>The detailed error:</strong></p>
  
  <blockquote>
    <p>org.gradle.api.tasks.TaskExecutionException: Execution failed for task
    ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.  at
    org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
      at
    org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
      at
    org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
      at
    org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
      at
    org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
      at
    org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
      at
    org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
      at
    org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
      at
    org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
      at
    org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
      at
    org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
      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:256)
      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:249)
      at
    org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
      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:663)
      at
    org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
      at
    org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
      at
    org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:59)
      at
    org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:130)
      at
    org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
      at
    org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
      at
    org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
      at
    org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
      at
    org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:46)
      at
    org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
      at
    org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
      at
    org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:336)
      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.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:210)
      at
    org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
      at
    org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:115)
      at
    org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
      at
    org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
      at
    org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
      at
    org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
      at
    org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
      at
    org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:62)
      at
    org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
      at
    org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
      at
    org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
      at
    org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
      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.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
      at
    org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
      at
    org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:49)
      at
    org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
      at
    org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
      at
    org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
      at
    org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
      at
    org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
      at
    org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
      at
    org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
      at
    org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
      at
    org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
      at
    org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
      at
    org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
      at
    org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
      at
    org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
      at
    org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
      at
    org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
      at
    org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
      at
    org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
      at
    org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
      at
    org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
      at
    org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
      at org.gradle.util.Swapper.swap(Swapper.java:38)    at
    org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
      at
    org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
      at
    org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
      at
    org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
      at
    org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
      at
    org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
      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:1149)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at
    org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.lang.Thread.run(Thread.java:748) Caused by:
    java.lang.RuntimeException:
    com.android.builder.dexing.DexArchiveMergerException: Error while
    merging dex archives:
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\0.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\1.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\2.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\3.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\4.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\5.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\6.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\7.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\8.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\9.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\12.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\13.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\14.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\15.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\16.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\17.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\18.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\19.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\20.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\21.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\22.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\23.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\24.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\25.jar
    Program type already present:
    com.google.android.maps.GestureDetector$GestureHandler Learn how to
    resolve the issue at
    <a href="https://developer.android.com/studio/build/dependencies#duplicate_classes" rel="nofollow noreferrer">https://developer.android.com/studio/build/dependencies#duplicate_classes</a>.
      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:230)
      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:50)
      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:124)
      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:113)
      at
    org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
      ... 108 more Caused by:
    com.android.builder.dexing.DexArchiveMergerException: Error while
    merging dex archives:
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\0.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\1.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\2.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\3.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\4.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\5.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\6.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\7.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\8.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\9.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\12.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\13.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\14.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\15.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\16.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\17.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\18.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\19.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\20.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\21.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\22.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\23.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\24.jar,
    F:\Projetos\SIAGN_Vendor\app\build\intermediates\transforms\dexBuilder\debug\25.jar
    Program type already present:
    com.google.android.maps.GestureDetector$GestureHandler Learn how to
    resolve the issue at
    <a href="https://developer.android.com/studio/build/dependencies#duplicate_classes" rel="nofollow noreferrer">https://developer.android.com/studio/build/dependencies#duplicate_classes</a>.
      at
    com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
      at
    com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
      at
    com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
      at
    com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:122)
      at
    com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
      at
    com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
      at
    com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
      ... 124 more Caused by:
    com.android.tools.r8.CompilationFailedException: Compilation failed to
    complete  at
    com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:65)
      at
    com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43)
      at com.android.tools.r8.D8.run(D8.java:90)  at
    com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:115)
      ... 129 more Caused by: com.android.tools.r8.utils.AbortException:
    Error: Program type already present:
    com.google.android.maps.GestureDetector$GestureHandler    at
    com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
      at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
      at
    com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:59)
      ... 132 more</p>
  </blockquote>