web-dev-qa-db-fra.com

échec de la résolution, les plug-ins Gradle tiers peuvent en être la cause

Tout fonctionne correctement avant de mettre à jour Android studio 3.0.1, mais après avoir mis à jour Android studio, je suis coincé avec 

La configuration 'compiler' est obsolète et a été remplacée par 'implémentation' . Elle sera supprimée à la fin de 2018. Impossible de résoudre le problème: glideOpen File Folder/home/lalit /repositories/Android/WaveDist/app/build/Generated/source/kaptKotlin/debugFolder /home/lalit/repositories/Android/WaveDist/app/build/generated/source/kaptKotlin/release3rdrd-party Gradle plug-ins peut être la cause

Ma dépendance aux diplômes 

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.theartofdev.edmodo:Android-image-cropper:2.2.+'
    implementation 'com.github.wrdlbrnft:sorted-list-adapter:0.2.0.1'
    implementation 'com.Android.support:appcompat-v7:27.1.0'
    implementation 'com.Android.support:recyclerview-v7:27.1.0'
    implementation 'com.Android.support:cardview-v7:27.1.0'
    implementation 'com.Android.support:support-v4:27.1.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.retrofit2:retrofit:2.0.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
    implementation 'com.Android.support:design:27.1.0'
    implementation 'com.Android.support:support-v13:27.1.0'
    implementation 'com.Android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    implementation 'com.google.firebase:firebase-core:12.0.0'
    implementation 'com.google.firebase:firebase-messaging:12.0.0'
    implementation 'com.google.Android.gms:play-services-analytics:12.0.0'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'com.Android.support:support-vector-drawable:27.1.0'
    implementation 'com.Android.support:support-core-utils:27.1.0'
    testImplementation 'junit:junit:4.12'
    implementation 'Android.Arch.lifecycle:common-Java8:1.1.1'
    implementation 'Android.Arch.lifecycle:extensions:1.1.1'
    implementation 'Android.Arch.lifecycle:reactivestreams:1.1.1'
    implementation 'Android.Arch.persistence.room:runtime:1.0.0'
    kapt "Android.Arch.persistence.room:compiler:1.0.0"
    implementation 'com.google.firebase:firebase-auth:12.0.0'

    implementation 'com.google.Android.gms:play-services-maps:12.0.0'
    implementation 'com.google.firebase:firebase-database:12.0.0'
    implementation 'com.google.maps.Android:android-maps-utils:0.5'
    implementation 'com.google.Android.gms:play-services-location:12.0.0'
    implementation 'com.google.Android.gms:play-services-places:12.0.0'
    implementation 'com.google.Android.gms:play-services-base:12.0.0'

}

Niveau d'application:

buildscript {
    ext.kotlin_version = '1.2.30'
    ext.roomVersion = '1.0.0'
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
        google()
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:3.1.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

Comment puis-je résoudre ce problème? Aidez-moi, s'il vous plaît..

EDIT J'ai ajouté mavenCentral () qui résout "échec de la résolution de plané", .__ et maintenant je suis fini avec ceci

Folder /home/lalit/repositories/Android/WaveDist/app/build/generated/source/kaptKotlin/debug


Folder /home/lalit/repositories/Android/WaveDist/app/build/generated/source/kaptKotlin/release


3rd-party Gradle plug-ins may be the cause

Modifier

J'utilise dexMode, j'ai donc supprimé 

 dexOptions {
        jumboMode true
    }

et ajouté multiDexEnabled true dans la configuration par défaut, ce qui a supprimé mon erreur de compilation.

Maintenant, quand j'essaie d'exécuter l'application, il affiche une erreur longue ...

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
    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.build.api.transform.TransformException: com.Android.builder.dexing.DexArchiveBuilderException: com.Android.builder.dexing.DexArchiveBuilderException: Failed to process /home/lalit/.gradle/caches/modules-2/files-2.1/Android.Arch.lifecycle/common-Java8/1.1.1/795d68cd761d093ccb235d1d91b8fd17c2ae25ff/common-Java8-1.1.1.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.build.api.transform.TransformException: com.Android.builder.dexing.DexArchiveBuilderException: com.Android.builder.dexing.DexArchiveBuilderException: Failed to process /home/lalit/.gradle/caches/modules-2/files-2.1/Android.Arch.lifecycle/common-Java8/1.1.1/795d68cd761d093ccb235d1d91b8fd17c2ae25ff/common-Java8-1.1.1.jar
    at com.Android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.Java:327)
    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.builder.dexing.DexArchiveBuilderException: com.Android.builder.dexing.DexArchiveBuilderException: Failed to process /home/lalit/.gradle/caches/modules-2/files-2.1/Android.Arch.lifecycle/common-Java8/1.1.1/795d68cd761d093ccb235d1d91b8fd17c2ae25ff/common-Java8-1.1.1.jar
    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.reportException(ForkJoinTask.Java:677)
    at Java.util.concurrent.ForkJoinTask.join(ForkJoinTask.Java:720)
    at com.Android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.Java:146)
    at com.Android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.Java:306)
    ... 51 more
Caused by: com.Android.builder.dexing.DexArchiveBuilderException: Failed to process /home/lalit/.gradle/caches/modules-2/files-2.1/Android.Arch.lifecycle/common-Java8/1.1.1/795d68cd761d093ccb235d1d91b8fd17c2ae25ff/common-Java8-1.1.1.jar
    at com.Android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.Java:803)
    at com.Android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$8(DexArchiveBuilderTransform.Java:728)
    at Java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.Java:1424)
    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)
Caused by: com.Android.builder.dexing.DexArchiveBuilderException: Error while dexing.
    at com.Android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.Java:169)
    at com.Android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.Java:146)
    at com.Android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.Java:798)
    ... 6 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.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.Java:144)
    ... 7 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:67)
    at com.Android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.Java:62)
    ... 10 more
    Suppressed: com.Android.tools.r8.ApiLevelException: Default interface methods are only supported starting with Android N (--min-api 24): void Android.Arch.lifecycle.DefaultLifecycleObserver.onCreate(Android.Arch.lifecycle.LifecycleOwner)
        at com.Android.tools.r8.dex.FileWriter.checkInterfaceMethod(FileWriter.Java:247)
        at com.Android.tools.r8.dex.FileWriter.checkInterfaceMethods(FileWriter.Java:213)
        at com.Android.tools.r8.dex.FileWriter.generate(FileWriter.Java:140)
        at com.Android.tools.r8.dex.ApplicationWriter.writeDexFile(ApplicationWriter.Java:356)
        at com.Android.tools.r8.dex.ApplicationWriter.lambda$write$2(ApplicationWriter.Java:188)
        ... 5 more
8
Lalit Jadav

Après deux modifications , finalement j'ai résolu mon problème en ajoutant ceci 

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

et fichier Gradle

buildscript {
    ext.kotlin_version = '1.2.30'
    ext.roomVersion = '1.0.0'
    repositories {
        mavenCentral()
        jcenter()
        google()
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        google()
    }
}

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

Modifier

cela m'aide à résoudre mon problème de TaskExecutionExceptionhttps://stackoverflow.com/a/47387435/2809351

4
Lalit Jadav

Mettez à niveau la version de kotlin "1.2.31" Ajoutez ces dépendances dans votre fichier de gradation au niveau de l'application:

Android {
  ...

  sourceSets {
    main.Java.srcDirs += 'src/main/kotlin'
  }
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib"
}

N'oubliez pas d'ajouter un plugin:

appliquer le plugin: 'kotlin-Android'

Supprimer l'ancienne dépendance des jetbrains 

la mise en oeuvre "org.jetbrains.kotlin: kotlin-stdlib-jre7: $ kotlin_version"

Ça va t'aider :)

4
Priya

Cette erreur se produit lorsque vous mettez à jour le logiciel Gradle ou Android Studio vers la dernière version. Voici le correctif pour ce problème.

Vérifiez votre fichier de classement du projet. S'il existe jcenter dans les référentiels, supprimez-le et construisez le projet . La hiérarchie du projet ressemblera à ceci:

allprojects {
repositories {
    google()
    mavenCentral()
}

}

Si l'erreur se reproduit, après avoir supprimé jcenter(), ajoutez maven { url 'https://maven.google.com' } dans les référentiels et générez à nouveau.

Cela résoudra votre problème.

1
Jerin A Mathews

J'ai eu ce problème plus tôt, mais résolu.

Assurez-vous que dans votre build.gradle (Projet), vous avez:

mavenCentral()
maven { url 'https://maven.google.com' }

Je l'ai dans les deux dépôts.

Après avoir ajouté cela, il me restait une erreur. Si vous le faites, commentez jcenter ().

Ceci est mon build.gradle pour le faire fonctionner:

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

buildscript {

    repositories {
        google()
        //jcenter()
        mavenCentral()
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:3.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

allprojects {
    repositories {
        google()
        //jcenter()
        mavenCentral()
        maven { url 'https://maven.google.com' }
    }
}

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

Faites-moi savoir si cela fonctionne aussi pour vous.

0
H Wong