Could not resolve all files for configuration ':app:debugRuntimeClasspath'
Как исправить данную ошибку сборки и импортировать ExoPlayer в проект Android Studio?
Получаю ошибку сборки в своем учебном проекте под Android. Чистый проект сразу после создания успешно собирается, но невозможно собрать проект с импортированным ExoPlayer - gradle sync успешно выполняется, но при попытке собрать проект получаю множественные ошибки сборки вида:
> Failed to transform exoplayer-common-2.18.6.aar (com.google.android.exoplayer:exoplayer-common:2.18.6) to match attributes {artifactType=android-jni, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find exoplayer-common-2.18.6.aar (com.google.android.exoplayer:exoplayer-common:2.18.6).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-common/2.18.6/exoplayer-common-2.18.6.aar
При попытке открыть в браузере приводимые в ошибках ссылки, сервер возвращает 404. В старых ответах на аналогичные вопросы говорят, что необходимо использовать свежие версии библиотек, но я и так использую последние версии, соответственно те ответы мне не помогли.
build.gradle:
plugins {
id 'com.android.application'
}
android {
namespace 'org.example.exoplayeractivity'
compileSdk 33
defaultConfig {
applicationId "org.example.exoplayeractivity"
minSdk 27
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.exoplayer:exoplayer:2.18.6'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
setting.gradle:
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "exoPlayerActivity"
include ':app'