After migrating from Android Studio 3.0 (Canary 5) to Android Studio 3.0 (Beta 1), and moving to latest gradle , i.e. \'com.android.tools.build:gradle:3.0.0-beta1\'
If none of the above solutions are working then add mavenLocal()
:
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
mavenLocal()
google()
}
}
Move the google() item up to make sure it's before the jcenter().
repositories {
jcenter()
google()
}
Update all the gradle dependencies to latest version .. That’s it
if you are in China, Please use
allprojects {
respositories {
google()
}
}
to instead
allprojects {
respositories {
maven {
url 'https://maven.google.com'
}
}
}
don't ask me why, I don't want to tell you.... may be 'https://maven.google.com' was selected by GFW?
First you need to clean the project , and then rebuild it.
Build ----> Clean Project
Build ----> Rebuild Project
allprojects {
repositories {
google()
}
}
worked for me instead of
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
}
}