Android Studio: Could not find com.android.tools.build:gradle:2.0.0-alpha2

后端 未结 8 2221
温柔的废话
温柔的废话 2020-12-16 09:01

Recently I have updated my Android Studio to latest version from Latest Android Studio Canary Build: 2.0 Preview

After updating to the new version, my current workin

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-16 09:50

    Apparently the build tools have been moved from maven to jcenter so you need to change the code from:

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

    to this

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.0.0-alpha2'
        }
    }
    

    More details on the changes:

    Android Tools Project Site http://tools.android.com/recent

    Android Developer Tools community https://plus.google.com/communities/114791428968349268860/stream/7f20992b-7d9a-4309-9d94-6fbe08f0ad6e

提交回复
热议问题