Issue with play-services-location:16.+
Describe the bug Using play-services-location:16.+ does not allow the app to build properly and throws an error `Execution failed for task ':app:mergeReleaseAssets'.
Could not resolve all files for configuration ':app:releaseRuntimeClasspath'. Could not resolve com.google.android.gms:play-services-location:16.+. Required by: project :app > project :location > Failed to list versions for com.google.android.gms:play-services-location. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'. > Read timed out`
Solution By updating the gradle file with play-services-location:17.0.0 everything works properly
I'm having this same problem. Could you elaborate on what you did to get it resolved?
Hi everyone.. I'm having the same problem.. but in my case the location plugin is trying to fetch from google.bintray instead of jcenter.bintray.. Jcenter is down and should not be used anymore.. a 16+ is the problem in my case..
android/build.gradle
dependencies {
compileOnly 'androidx.annotation:annotation:1.0.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'androidx.test:core:1.0.0'
testImplementation 'org.robolectric:robolectric:4.3'
api 'com.google.android.gms:play-services-location:16.+' // problem here 16.+ should be 16.0.0 (enforce the version)
implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
my project android/build.gradle
buildscript {
ext.kotlin_version = '1.5.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5' // Google Services plugin
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
the only way i could sort this was adding the below code to:
app/build.gradle
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-location:17.0.0'
}
}
dependencies {
...
implementation 'com.google.android.gms:play-services-location:17.0.0'
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.