我有这个问题并通过在buildscript中添加存储库来解决这个问题.在这里你可以看到我的build.gradle(不是模块,而是项目):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

maven { url "https://jitpack.io" }

}

dependencies {

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

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

maven { url "https://jitpack.io" }

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

我不知道为什么我需要这样做,因为我的朋友刚刚在allprojects块中添加了存储库,它对他有用.

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐