So I'm trying to sync an android studio project but flexbox keeps failing to resolve. As far as I'm aware all relevant repositories are included. I've tried on multiple internet connections (no proxies involved) to no avail.
I've tried different versions of flexbox as well.
Here's my app build.gradle:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
maven { url "https://jitpack.io" }
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jetbrains.kotlin.android.extensions'
androidExtensions {
experimental = true
}
apply plugin: 'io.fabric'
apply plugin: 'jacoco'
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
mavenCentral()
}
All other google dependencies download and install and it appears that flexbox does download during the gradle sync but always fails afterwards. I really don't know what could be causing this. I've completely removed Android Studio (inc Gradle files, sdk files, preferences, etc) and reinstalled from scratch but this error just keeps occurring. I'm really at a loss here.
The dependency is listed as:
implementation 'com.google.android:flexbox:1.1.0'
EDIT: So while trying to sync again I managed to screengrab the statusbar at the bottom of Android Studio to see what was going on when I saw 'flexbox' flash up:
When I try to go to this URL in the browser I get a 404
Is this even the correct repo?
For those of you who came to this question after removing jcenter() from their gradle files:
According to this comment (https://github.com/google/flexbox-layout/issues/566#issuecomment-844630491) the flexbox library is available from the google maven repository now.
This however requires to change the reference to:
dependencies {
implementation 'com.google.android.flexbox:flexbox:3.0.0'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With