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

后端 未结 8 2202
温柔的废话
温柔的废话 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

    0 讨论(0)
  • 2020-12-16 09:53

    On my side travis build failed with error message "Could not find com.android.tools.build:gradle:3.0.1".

    After addeing google() as additional repository the problem was gone.

    buildscript {
        repositories {
            jcenter()
            google()
    

    My local build did not fail because i had installed before "com.android.tools.build:gradle:3.0.1" with anddroid-sdk-manager

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