Я уже давно сталкиваюсь с этой проблемой. Я пробовал различные решения, например переключение между автономным и онлайн-режимами в Gradle, добавляя
maven { url = uri("https://jitpack.io") } в проекте build.gradle и многое другое, но я все еще не могу устранить ошибку.
Примечание: Мой проект в основном написан на Java, но недавно я добавил код Kotlin из-за требований Supabase Database SDK. Именно поэтому вы можете встретить в проекте Kotlin и Groovy
Ошибка:
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Проект build.gradle:
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
maven { url = uri("https://jitpack.io") }
mavenCentral()
jcenter()
}
dependencies {
classpath libs.google.services
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
alias(libs.plugins.androidApplication) apply false
}
Приложение build.gradle:
plugins {
alias(libs.plugins.androidApplication)
id 'com.google.gms.google-services'
id 'kotlin-android'
}
android {
namespace 'com.indiedev91.looksmaxeai_bebetterversion'
compileSdk 35
defaultConfig {
applicationId "com.indiedev91.looksmaxeai_bebetterversion"
minSdk 24
targetSdk 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
buildConfigField "String", "API_KEY", "\"your_production_api_key\""
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "API_KEY", "\"your_production_api_key\""
}
}
buildFeatures {
buildConfig = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
}
dependencies {
implementation libs.appcompat
implementation libs.material
implementation libs.activity
implementation libs.constraintlayout
implementation libs.firebase.auth
implementation libs.firebase.firestore
implementation libs.firebase.crashlytics.buildtools
implementation libs.firebase.storage
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
def camerax_version = "1.3.0"
implementation "androidx.camera:camera-core:$camerax_version"
implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version"
implementation "androidx.camera:camera-view:$camerax_version"
implementation 'androidx.concurrent:concurrent-futures-ktx:1.1.0'
implementation 'com.google.guava:guava:29.0-android'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation "androidx.work:work-runtime:2.10.0"
// Google Credential Manager
implementation "androidx.credentials:credentials:1.5.0-beta01"
implementation "androidx.credentials:credentials-play-services-auth:1.5.0-beta01"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
implementation 'androidx.core:core-ktx:1.3.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation(platform("io.github.jan-tennert.supabase:bom:3.0.1"))
implementation("io.github.jan-tennert.supabase:postgrest-kt")
implementation("io.github.jan-tennert.supabase:gotrue-kt")
implementation("io.ktor:ktor-client-android:3.0.1")
}
settings.gradle:
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "LooksMaxE AI - Be Better Version"
include ':app'
Подробнее здесь: https://stackoverflow.com/questions/792 ... ppdebugrun
Невозможно разрешить — не удалось разрешить все файлы конфигурации «:app:debugRuntimeClasspath». ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение