web-dev-qa-db-fra.com

Erreur: type de programme déjà présent: androidx.core.R

Je rencontre ce problème lorsque j'essaie de créer une version.

Fichier Build.gradle

apply plugin: 'com.Android.application'
apply plugin: 'kotlin-Android-extensions'
apply plugin: 'kotlin-Android'
apply plugin: 'com.google.gms.google-services'

Android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.trevexs.sengaapp"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 5
        versionName "1.5.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-Android-optimize.txt'), 'proguard-rules.pro'
        }

        debug {
            versionNameSuffix "-DEBUG"
        }
    }
    dataBinding {
        enabled = true
    }
    testOptions {
        unitTests {
            returnDefaultValues = true
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.media:media:1.0.1'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'

    implementation 'com.romandanylyk:pageindicatorview:1.0.2'
    implementation 'com.google.code.gson:gson:2.8.5'

    //fire-base staff
    implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
    implementation 'com.google.firebase:firebase-auth:18.0.0'
    implementation 'com.google.Android.gms:play-services-auth:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:20.1.0'
    implementation 'com.google.firebase:firebase-core:17.0.0'
    implementation 'com.google.firebase:firebase-storage:18.0.0'

    // Required for instrumented tests
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:core:1.2.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    testImplementation "org.mockito:mockito-core:1.10.19"
    androidTestImplementation 'androidx.test:runner:1.2.0'

    androidTestImplementation 'androidx.test:rules:1.2.0'
    // Optional -- Hamcrest library
    androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
    // Optional -- UI testing with Espresso
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    // Optional -- UI testing with UI Automator
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    androidTestImplementation 'androidx.annotation:annotation:1.0.1'

    //kotlin staff
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"

    //material design staff
    implementation 'com.google.Android.material:material:1.0.0'

    //circular image
    implementation 'de.hdodenhof:circleimageview:3.0.0'

    //crashlytics
    implementation 'com.crashlytics.sdk.Android:crashlytics:2.10.1'

    //picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    //dialog flow dependencies
    implementation 'com.github.kittinunf.fuel:fuel-Android:2.1.0'
    implementation 'com.github.bassaer:chatmessageview:2.0.1'
    implementation 'ai.api:sdk:2.0.7'
    implementation 'ai.api:libai:1.6.12'

}
repositories {
    mavenCentral()
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

créer des journaux

    org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
    at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.Java:386)
    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.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.Java:247)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.Java:159)
    at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.Java:134)
    at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.Java:58)
    at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.Java:55)
    at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.Java:82)
    at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.Java:75)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.Java:183)
    at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.Java:40)
    at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.Java:75)
    at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.Java:55)
    at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.Java:54)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.Java:35)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.Java:35)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.Java:58)
    at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.Java:32)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.Java:39)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.Java:49)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.Java:44)
    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.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.Java:44)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.Java:49)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.Java:46)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.Java:78)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.Java:46)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.Java:31)
    at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.Java:42)
    at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.Java:28)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.Java:78)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.Java:52)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.Java:59)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.Java:36)
    at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.Java:68)
    at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.Java:38)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.Java:37)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.Java:26)
    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:60)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.Java:32)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.Java:55)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.Java:41)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.Java:48)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.Java:32)
    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:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.Java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.Java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.Java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:104)
    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:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.Java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:104)
    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:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.Java:81)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.Java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.Java:104)
    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: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: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForRelease'.
    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)
    ... 6 more
Caused by: Java.lang.RuntimeException: com.Android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives: 
Learn how to resolve the issue at https://developer.Android.com/studio/build/dependencies#duplicate_classes.
Program type already present: androidx.core.R
    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:47)
    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.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: com.Android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives: 
Learn how to resolve the issue at https://developer.Android.com/studio/build/dependencies#duplicate_classes.
Program type already present: androidx.core.R
    at com.Android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:147)
    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)
    ... 77 more
Caused by: com.Android.builder.multidex.D8MainDexList$MainDexListException: Error while merging dex archives: 
Learn how to resolve the issue at https://developer.Android.com/studio/build/dependencies#duplicate_classes.
Program type already present: androidx.core.R
    at com.Android.builder.multidex.D8MainDexList.getExceptionToRethrow(D8MainDexList.Java:107)
    at com.Android.builder.multidex.D8MainDexList.generate(D8MainDexList.Java:95)
    at com.Android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:131)
    ... 80 more
Caused by: com.Android.tools.r8.CompilationFailedException: Compilation failed to complete
    at com.Android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.Java:81)
    at com.Android.tools.r8.utils.ExceptionUtils.withMainDexListHandler(ExceptionUtils.Java:55)
    at com.Android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.Java:139)
    at com.Android.builder.multidex.D8MainDexList.generate(D8MainDexList.Java:93)
    ... 81 more
Caused by: com.Android.tools.r8.utils.AbortException: Error: Program type already present: androidx.core.R
    at com.Android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.Java:101)
    at com.Android.tools.r8.utils.Reporter.fatalError(Reporter.Java:72)
    at com.Android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.Java:66)
    ... 84 more
5
Isaac Sekamatte

Vous avez un problème avec l'ordre des plugins appliqués.

apply plugin: 'com.google.gms.google-services' Cela doit toujours être conservé à la fin du fichier.

Aussi, apply plugin: "io.fabric" doit être appliqué après com.Android.application.

Si vous avez encore des confusions sur build.gradle. Modifiez votre question en incluant les deux buid.gradle fichiers de app et projet racine, et informez-moi en commentant cette réponse.

    apply plugin: 'com.Android.application'
    apply plugin: "io.fabric"
    apply plugin: 'kotlin-Android'
    apply plugin: "kotlin-Android-extensions"
    apply plugin: "kotlin-kapt"

    Android {
        compileSdkVersion 28
        defaultConfig {
            applicationId "com.trevexs.sengaapp"
            minSdkVersion 19
            targetSdkVersion 28
            versionCode 5
            versionName "1.5.0"
            multiDexEnabled true
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-Android-optimize.txt'), 'proguard-rules.pro'
            }

            debug {
                versionNameSuffix "-DEBUG"
            }
        }
        dataBinding {
            enabled = true
        }
        testOptions {
            unitTests {
                returnDefaultValues = true
            }
        }

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'androidx.appcompat:appcompat:1.0.2'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.media:media:1.0.1'
        implementation 'androidx.recyclerview:recyclerview:1.0.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'

        implementation 'com.romandanylyk:pageindicatorview:1.0.2'
        implementation 'com.google.code.gson:gson:2.8.5'

        //fire-base staff
        implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
        implementation 'com.google.firebase:firebase-auth:18.0.0'
        implementation 'com.google.Android.gms:play-services-auth:17.0.0'
        implementation 'com.google.firebase:firebase-firestore:20.1.0'
        implementation 'com.google.firebase:firebase-core:17.0.0'
        implementation 'com.google.firebase:firebase-storage:18.0.0'

        // Required for instrumented tests
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test:core:1.2.0'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        testImplementation "org.mockito:mockito-core:1.10.19"
        androidTestImplementation 'androidx.test:runner:1.2.0'

        androidTestImplementation 'androidx.test:rules:1.2.0'
        // Optional -- Hamcrest library
        androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
        // Optional -- UI testing with Espresso
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        // Optional -- UI testing with UI Automator
        androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
        androidTestImplementation 'androidx.annotation:annotation:1.0.1'

        //kotlin staff
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"

        //material design staff
        implementation 'com.google.Android.material:material:1.0.0'

        //circular image
        implementation 'de.hdodenhof:circleimageview:3.0.0'

        //crashlytics
        implementation 'com.crashlytics.sdk.Android:crashlytics:2.10.1'

        //picasso
        implementation 'com.squareup.picasso:picasso:2.71828'

        //dialog flow dependencies
        implementation 'com.github.kittinunf.fuel:fuel-Android:2.1.0'
        implementation 'com.github.bassaer:chatmessageview:2.0.1'
        implementation 'ai.api:sdk:2.0.7'
        implementation 'ai.api:libai:1.6.12'

    }
    apply plugin: 'com.google.gms.google-services'
1
Sagar Chapagain