Gradle build tool cannot find play-services-tasks.aar? Why?
After doing the following changes the error disappeared:
- Removed
maven { url 'https://maven.google.com' }
from repositories in app build.gradle. - Added
maven { url 'https://maven.google.com' }
as first entry in allprojects/repositories in top level build.gradle - Changed all play-services and firebase dependencies to the latest versions
- Changed version of google-services plugin to
classpath 'com.google.gms:google-services:4.0.1'
The fix is to put google url above jcenter() in your repository list in gradle.
Here's the issue: https://issuetracker.google.com/issues/80362794
in my case:
allprojects {
repositories {
google()
jcenter()
}
}
solves my problems
- in my old configuration was only "jcenter()"
- first line jcenter(), second line google() doesn't work
For my case I removed mavenCentral()
from app gradle repositores and moved maven { url 'https://maven.google.com' }
to the first positionin in project gradle as Ivan Rigamonti suggested above. No Firebase dependecies update needed.
(this should be a comment, but I don't have enough reputation)