Open leeprobert opened 2 years ago
This could help:
//Project level build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
//App level build.gradle
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-location:16.0.0'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.android.gms:play-services-location:16.0.0'//add this line
}
This possibly may not affect the main package library but could be necessary for the examples
I couldn't reproduce this, do you have any more ideas on how to clear the package from the cache?
I've tried running rm -r ~/.pub-cache/hosted
, rm -r ~/.pub-cache/git
, ./gradlew cleanBuildCache
in both the android
and the example/android
, and flutter pub cache clean
and /gradlew cleanBuildCache
to no unvail, it still builds fine and doesn't throw the error you reported
This is affecting many packages and I have been battling it with other things like
location
but in this case it seems to be related toplay-services-auth
. You may not notice this until you clear the gradle cache in Android Studio and it attempts to download files from the specified repository. It wants to use https://google.bintray.com but for some reason this server is now dead. Here's the compilation error:You can see the error is related to its inability to pull the code from the server:
Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-auth/maven-metadata.xml'. Received status code 502 from server: Bad Gateway