I rebuild an existing project in Android Studio and the following error occurs
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android.exoplayer:exoplayer:2.11.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer/2.11.4/exoplayer-2.11.4.pom
- https://jcenter.bintray.com/com/google/android/exoplayer/exoplayer/2.11.4/exoplayer-2.11.4.pom
- https://repo.maven.apache.org/maven2/com/google/android/exoplayer/exoplayer/2.11.4/exoplayer-2.11.4.pom
- https://jitpack.io/com/google/android/exoplayer/exoplayer/2.11.4/exoplayer-2.11.4.pom
Required by:
project :app > com.github.HamidrezaAmz:MagicalExoPlayer:1.0.16
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
I did the followings but it didn’t solve the problem:
- added this to build.gradle :
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
- Also added this to build.gradle according to this:
allprojects {
repositories {
maven { url 'https://google.bintray.com/exoplayer/' }
maven { url 'https://dl.bintray.com/android/android-tools' }
maven { url 'https://dl.bintray.com/firebase/gradle/' }
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
flatDir {
dirs 'libs'
}
}
}
Legacy versions of ExoPlayer were hosted on a discontinued Maven repository. 2.11.4
, from April 2020, is one of those versions.
The simplest solution is to upgrade to 2.13.0
or higher, as those versions are hosted on Google’s own Maven repository (google()
). Most likely that will require upgrading to a newer version of com.github.HamidrezaAmz:MagicalExoPlayer
, as 1.0.16
is also very old.
Recognized by Mobile Development Collective
1