I had this problem and solved it by adding a repository to buildscript. Here you can see my build.gradle (not a module, but a project one):
buildscript {
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I donβt know why I need this, because a friend of mine just added a repository to the allprojects block, and it works for him.
source
share