Skip to content

Could not resolve all artifacts for configuration 'classpath' #23553

Closed

Description

@SuperCup

From URL: https://www.flutterchina.club/support.md

Finished with error: Please review your Gradle project setup in the android/ folder.
* Error running Gradle:
ProcessException: Process "/Users/../Desktop/flutter_app/android/gradlew" exited abnormally:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/../Desktop/flutter_app/android/app/build.gradle' line: 25

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar

* Try:
Run with --stacktrace option to get the stack trace. 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.org

BUILD FAILED in 0s
  Command: /Users/../Desktop/flutter_app/android/gradlew app:properties`

I have already done:

buildscript {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://dl.google.com/dl/android/maven2'
        }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

Activity

  1. jsakars commented on Oct 26, 2018

    @jsakars

    Same here. This is fixed in master but not under stable release yet. For now, I would suggest switching to master branch and wait for the fix to be released.

    #23095

    Here is the commit - 125b5d6

  2. zoechi commented on Oct 27, 2018

    @zoechi
    Contributor

    Merging with #23404

  3. sumation commented on Nov 1, 2018

    @sumation

    same issue

  4. Parth1029 commented on Nov 2, 2018

    @Parth1029

    I solved the problem by moving :

    maven {
        url 'https://dl.google.com/dl/android/maven2'
    }

    in the top of:

    jcenter()

    in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :

        buildscript {
        repositories {
            maven {
                url 'https://dl.google.com/dl/android/maven2'
            }
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.2'
        }
    }
  5. sumation commented on Nov 2, 2018

    @sumation

    same issue
    Solved by adding "google()" to gradle

  6. songyiYu commented on Nov 2, 2018

    @songyiYu
    Contributor

    @Parth1029 It is solved! Thank you 👍

  7. Sly777 commented on Nov 2, 2018

    @Sly777

    @Parth1029 thanks it works on my app as well!

  8. rravithejareddy commented on Nov 3, 2018

    @rravithejareddy

    still i am facing the issue.

  9. xring commented on Nov 5, 2018

    @xring

    @ Parth1029 Great work! Thx.

  10. rravithejareddy commented on Nov 5, 2018

    @rravithejareddy

    @Parth1029 still i am facing the issue, i tried to adding google(), but still i am getting same issue.

  11. marianoarga commented on Nov 12, 2018

    @marianoarga

    Upgrading Flutter should fix it @rravithejareddy

  12. rravithejareddy commented on Nov 13, 2018

    @rravithejareddy

    Fixed by adding google() in flutter.gradle. Thanks.

  13. yefeidd commented on Nov 23, 2018

    @yefeidd

    I solved the problem.
    File->setting->build->Gradle->Android studio
    checked "Enable embedded Maven repository".

  14. ethanyou725 commented on Dec 16, 2018

    @ethanyou725
    gradle.properties set proxy 
    org.gradle.jvmargs=-Xmx1536M
    systemProp.http.proxyHost=127.0.0.1
    systemProp.http.proxyPort=yourport
    systemProp.https.proxyHost=127.0.0.1
    systemProp.https.proxyPort=yourport
    
  15. 13 remaining items

  16. aboutmydreams commented on Nov 15, 2019

    @aboutmydreams

    not work. I'm dying really too

  17. flutteradv commented on Dec 17, 2019

    @flutteradv

    I faced this error after upgrading to Flutter 1.12.13+hotfix.5 :

    Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
      > Could not download flutter_embedding_debug.jar (io.flutter:flutter_embedding_debug:1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695)
         > Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695/flutter_embedding_debug-1.0.0-2994f7e1e682039464cb25e31a78b86a3c59b695.jar'.
    
  18. onemanstartup commented on Dec 18, 2019

    @onemanstartup

    @flutteradv Update flutter, Accept android licences flutter doctor --android-licenses, run flutter clean

  19. flutteradv commented on Dec 19, 2019

    @flutteradv

    I ended up reverting back to flutter 1.9.1

  20. shaileshpanthee commented on Dec 31, 2019

    @shaileshpanthee

    I solved the problem by moving :

    maven {
        url 'https://dl.google.com/dl/android/maven2'
    }
    

    in the top of:

    jcenter()
    

    in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :

        buildscript {
        repositories {
            maven {
                url 'https://dl.google.com/dl/android/maven2'
            }
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.2'
        }
    }
    

    I couldn't find the file .flutter. Where is the .flutter dir located?

  21. thesidecommit commented on Jan 12, 2020

    @thesidecommit

    I solved the problem.In android folder,edit build.gradle file like this:

    buildscript {
        repositories {
            google()
            mavenCentral()  //add this line
            jcenter()
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
        }
    }
    

    It works.
    stackoverflow link

    It Worked!

  22. thesidecommit commented on Jan 12, 2020

    @thesidecommit

    I solved the problem by moving :

    maven {
        url 'https://dl.google.com/dl/android/maven2'
    }
    

    in the top of:

    jcenter()
    

    in the file: .flutter/packages/flutter_tools/gradle/flutter.gradle :

        buildscript {
        repositories {
            maven {
                url 'https://dl.google.com/dl/android/maven2'
            }
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.2'
        }
    }
    

    I couldn't find the file .flutter. Where is the .flutter dir located?

    .flutter is just a convention, here '.flutter' is the path where you extracted or installed flutter in your system. Hope this helps you.

  23. Niek-Okido commented on Feb 6, 2020

    @Niek-Okido

    edit the following in build.gradle :

        repositories {
            jcenter()
            mavenCentral() #add
            google() #add
        }
        ....
    }
    
  24. succygoldbaji commented on Mar 22, 2020

    @succygoldbaji

    Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.

    i Dont know why am getting this error......

    THIS IS MY build.gradle
    pls i dont know what to do

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

    buildscript {

    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        
    
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    

    }

    allprojects {
    repositories {
    google()
    jcenter()

    }
    

    }

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

  25. derekgithubs commented on Mar 23, 2020

    @derekgithubs

    I solved it by....

    • go to search icon on the top-right corner and search for "Execute Gradle Task".
    • click on result "Execute Gradle Task" after it appear , And you'll be given sort of options.
      NOTE: Now make sure you have internet.
    • double click on "gradle mergeDexRelease" among the other options.
      .....Now wait for it to finish download some stuffs, then you are good......

    It worked for me, i'm using Windows...

  26. MEANSTACKDIGITAL commented on Apr 3, 2020

    @MEANSTACKDIGITAL

    this is outrageous
    the whole subsystem, surrounding gradle needs to be torn out honked and redesigned and replaced
    I have never seen such lengthy issues on incomplete gradle mechanisms
    and they still havent gotten it right
    i spent days/weeks June 2019 on same gradle wrapper transient dependencies omissions and now its impact8in my development schedule again

    WHEN WILL THEY FINALLY DESIGN SOMETHING THATS CONFIGURABLE FROM THE ROOT FILE CONFIG.XML AND BE DONE WITH IT... environment variables anyone ?

    I know if Im going to shoot my mouth off I should do it myself

    well its simple

    a root environment variable that trickles down thru the whole archetype

    DONE

    and maybe a flag for caching to prevent tangled repo jars

  27. Sylvester-dev commented on Apr 8, 2020

    @Sylvester-dev

    @gayanramyakumara I am also facing same issue can i know how you solved this issue.

  28. MEANSTACKDIGITAL commented on Apr 8, 2020

    @MEANSTACKDIGITAL

    i went with capacitor
    instead of treating the android like a build artifact it treats it as a source artifact
    completely configurable

  29. lock commented on Apr 25, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  30. locked and limited conversation to collaborators on Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions