After updating Android Studio to version 3.1.0
I had the same problem, I solved it with
maven { url "https://maven.google.com" }
for TopMost buildScript like this at the project level gradle: -
buildscript { repositories { ..... ... maven { url "https://maven.google.com" }
For reference, take a sample gradle project level: -
buildscript { repositories { google() jcenter() maven { url 'https://maven.fabric.io/public' } maven { url 'https://jitpack.io' } mavenCentral() maven { url 'https://maven.fabric.io/public' } maven { url "https://maven.google.com" } } dependencies { classpath 'com.android.tools.build:gradle:3.1.0' classpath 'io.fabric.tools:gradle:1.24.4' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
Note : - One more thing: -
In gradle-wrapper.properties use this: -
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Instead of 4.1-all.zip .
Edit : - If you want to quickly solve the problem, you can also try adding them - according to Omar's answer: -
maven { url "http://dl.bintray.com/riteshakya037/maven" }
together with
maven { url "https://maven.google.com" }
source share