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

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

    In the main build.gradle file, add jcenter() as main repo, just like that :

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

    Remove other repositories or make sure jcenter is the first one.

提交回复
热议问题