最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Android Gradle sync failed - Task failed with an exception.[Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toas

programmeradmin3浏览0评论

Task :app:writeDebugSigningConfigVersions UP-TO-DATE

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0) to match attributes {artifactType=android-databinding, .gradle.category=library, .gradle.libraryelements=jar, .gradle.status=release, .gradle.usage=java-runtime}. > Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0). Searched in the following locations: .9.0/md-toast-0.9.0.aar .9.0/md-toast-0.9.0.jar

  • Try:

Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at .

  • Exception is: .gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'. Caused by: .gradle.internal.resolve.ArtifactNotFoundException: Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0). Searched in the following locations: .9.0/md-toast-0.9.0.aar .9.0/md-toast-0.9.0.jar .gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.lambda$runBatch$1(DefaultBuildOperationQueue.java:238) Caused by: .gradle.internal.resolve.ArtifactNotFoundException: Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0).

==============================================================================

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to .2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1s 23 actionable tasks: 8 executed, 15 up-to-date

Project Level Gradle

buildscript {
    ext.kotlin_version = '1.9.0' // Use the latest stable Kotlin version
    apply from: 'versions.gradle'
    addRepos(repositories)

    repositories {
        google()
        mavenCentral()
        maven { url '/' }
        maven { url "/" }
        gradlePluginPortal()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.2.2'  // Updated AGP version
        classpath 'de.undercouch:gradle-download-task:4.1.2'
        classpath ".jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // Use ext variable
        classpath 'com.google.gms:google-services:4.4.2'
    }
}

plugins {
    id 'com.android.application' version '8.2.0' apply false
    id 'com.android.library' version '8.2.0' apply false
    id '.jetbrains.kotlin.android' version "$kotlin_version" apply false
    id 'com.google.gms.google-services' version '4.4.2' apply false
}

tasks.register('clean', Delete) {
    delete rootProject.buildDir
}

I have tried to update the gradle properties, while updating the target SDK version and gradle, I'm getting this error. The strange thing is that the I have no reference of this library[com.valdesekamdem.library:md-toast:0.9.0] in my project.

If anyone has faced the similar problem or any question, please share with me.

Thnaks in advance to be part of this findings.

Task :app:writeDebugSigningConfigVersions UP-TO-DATE

FAILURE: Build completed with 8 failures.

1: Task failed with an exception.

  • What went wrong: Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0) to match attributes {artifactType=android-databinding, .gradle.category=library, .gradle.libraryelements=jar, .gradle.status=release, .gradle.usage=java-runtime}. > Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0). Searched in the following locations: https://jcenter.bintray/com/valdesekamdem/library/md-toast/0.9.0/md-toast-0.9.0.aar https://jcenter.bintray/com/valdesekamdem/library/md-toast/0.9.0/md-toast-0.9.0.jar

  • Try:

Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle..

  • Exception is: .gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'. Caused by: .gradle.internal.resolve.ArtifactNotFoundException: Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0). Searched in the following locations: https://jcenter.bintray/com/valdesekamdem/library/md-toast/0.9.0/md-toast-0.9.0.aar https://jcenter.bintray/com/valdesekamdem/library/md-toast/0.9.0/md-toast-0.9.0.jar .gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.lambda$runBatch$1(DefaultBuildOperationQueue.java:238) Caused by: .gradle.internal.resolve.ArtifactNotFoundException: Could not find md-toast-0.9.0.aar (com.valdesekamdem.library:md-toast:0.9.0).

==============================================================================

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle./8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1s 23 actionable tasks: 8 executed, 15 up-to-date

Project Level Gradle

buildscript {
    ext.kotlin_version = '1.9.0' // Use the latest stable Kotlin version
    apply from: 'versions.gradle'
    addRepos(repositories)

    repositories {
        google()
        mavenCentral()
        maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
        maven { url "https://jitpack.io/" }
        gradlePluginPortal()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.2.2'  // Updated AGP version
        classpath 'de.undercouch:gradle-download-task:4.1.2'
        classpath ".jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // Use ext variable
        classpath 'com.google.gms:google-services:4.4.2'
    }
}

plugins {
    id 'com.android.application' version '8.2.0' apply false
    id 'com.android.library' version '8.2.0' apply false
    id '.jetbrains.kotlin.android' version "$kotlin_version" apply false
    id 'com.google.gms.google-services' version '4.4.2' apply false
}

tasks.register('clean', Delete) {
    delete rootProject.buildDir
}

I have tried to update the gradle properties, while updating the target SDK version and gradle, I'm getting this error. The strange thing is that the I have no reference of this library[com.valdesekamdem.library:md-toast:0.9.0] in my project.

If anyone has faced the similar problem or any question, please share with me.

Thnaks in advance to be part of this findings.

Share Improve this question asked Mar 7 at 7:08 DineshkumarBalanDineshkumarBalan 1241 silver badge12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The Library you are trying to use has been removed from jCenter

You can use the below structure in your repositories to implement it

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        maven { url 'https://jitpack.io' }
        maven { url "https://maven.google" }
        jcenter { url 'https://maven.aliyun/repository/public' }//important
        jcenter()
        mavenCentral()
    }
}

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论