Could not find com.android.tools.build:gradle:2.2.2

2017-7-8 Frank

It seems can’t resolve com.android.tools.build:gradle:2.2.2 dependency for the classpath.

For me, adding the jcenter to gradle.build resolves the issue:

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
}

or, alternatively, the line in grable.build

classpath 'com.android.tools.build:gradle:2.2.2'

can be changed to

classpath 'com.android.tools.build:gradle:2.1.3'

^^^ this version exist in repo1.maven.org

WRONG SUGGESTION:

Resolve all dependencies by running gradle task (can be done from Android Studio’s terminal):

For Linux:

./gradlew buildDependents

For Windows:

gradlew.bat buildDependents

Also, this commands might also help later

Linux:

./gradlew cleanIdea idea

Windows:

gradlew.bat cleanIdea idea

This is the reference to libgdx How-to-setup-development-env instruction

摘自:https://stackoverflow.com/questions/40826935/could-not-find-com-android-tools-buildgradle2-2-2

« 上一篇:常用shell | 下一篇:Vue.js + vue-awesome-swiper 图片轮播»

发表评论 登录

Top