Gradle error : Could not find com.android.tools.build:gradle:2.2.3

前端 未结 13 1327
盖世英雄少女心
盖世英雄少女心 2020-12-05 09:44

I\'m trying to build my android project using gradle and circleCI, but I\'ve got this error :

* What went wrong:
  A problem occurred configuring root projec         


        
相关标签:
13条回答
  • 2020-12-05 10:03

    It seems the current versions of the Android Gradle plugin are not added to Maven Central, but they are present on jcenter. Add jcenter() to your list of repositories and Gradle should find version 2.2.3. On Maven Central the newest available version is 2.1.3: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.android.tools.build%22%20AND%20a%3A%22gradle%22. You can also complain to the authors that the current versions are missing on Maven Central.

    0 讨论(0)
  • 2020-12-05 10:07

    buildscript {
    repositories {
       mavenCentral()
    }
    
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
    }
    
    }
    

    Just change the mavenCentral() to jcenter()

    0 讨论(0)
  • 2020-12-05 10:10

    Change the gradle version as same to android version like Right know we are using 2.3.2 of gradle

    0 讨论(0)
  • 2020-12-05 10:11

    i had the same issue when i update my android studio to 3.0 then its solved by adding

    buildscript {
         repositories {
        ...
        // You need to add the following repository to download the
        // new plugin.
        google()
    }
    
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
     }
    

    from https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#update_gradle

    0 讨论(0)
  • 2020-12-05 10:11

    Updating CordovaLib -> build.gradle also worked for me, as above. I was looking at the root build.gradle initially which was correct and already included jcenter().

    0 讨论(0)
  • 2020-12-05 10:14

    Only go to the following path and delete the caches folder completely then rebuild the project:

    C:\Users\[Your User Name]\.gradle

    0 讨论(0)
提交回复
热议问题