Unable to resolve com.google.android:flexbox:1.0.0 in Gradle build
Describe the bug I am encountering an issue when trying to build my Android project. The error states that it cannot resolve the dependency com.google.android:flexbox:1.0.0.
Error message:
* What went wrong:
Execution failed for task ':app:processDebugAndroidTestManifest'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android:flexbox:1.0.0.
Searched in the following locations:
- https://jitpack.io/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
- https://dl.google.com/dl/android/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
Required by:
project :app
> Could not find com.google.android:flexbox:1.0.0.
Searched in the following locations:
- https://jitpack.io/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
- https://dl.google.com/dl/android/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
Required by:
project :app > com.github.stfalcon-studio:Chatkit:0.4.1
To Reproduce Steps to reproduce the behavior:
Add the dependency implementation 'com.github.stfalcon-studio:Chatkit:0.4.1' to the build.gradle file. Sync the project with Gradle files. The build fails with the above error message. Expected behavior The build should successfully resolve the dependency for the Flexbox library.
Screenshots N/A
Smartphone (please complete the following information):
Device: [e.g. Pixel 4] OS: [e.g. Android 10] Library Version: [e.g. 3.0.0]
Facing same issue
Any updates on this? I can't build my project
I'm in the same situation.
Facing same issue
Looks like a lot of old packages were removed from jcenter archives. You can fork the project and bump up the flexbox dependency from 1.0.0 to 3.0.0 in the build.gradle file:
implementation "com.google.android.flexbox:flexbox:3.0.0"
also add the google maven repo https://maven.google.com in the project build.gradle file:
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com"}
}
}
Make a aar release build and include that instead of the current chatkit dependency, I also needed to add the flexbox dependency to the project using chatkit.
Anyone still facing issue - Here is forked version until it is resolved on this repo
the easiest way is clone this problem and import as library, it's better when you need to modify some library's method, i am sure everyone need to modify it, such as 'grouping avatar by date' function