Код: Выделить всё
Launching lib/main.dart on sdk gphone16k x86_64 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.getkeepsafe.relinker:relinker:1.4.5.
Required by:
project :app > io.flutter:flutter_embedding_debug:1.0.0-e672b006cb34c921db85b8e2f482ed3144a4574b
> Could not resolve com.getkeepsafe.relinker:relinker:1.4.5.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/getkeepsafe/relinker/relinker/1.4.5/relinker-1.4.5.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/getkeepsafe/relinker/relinker/1.4.5/relinker-1.4.5.pom'.
> repo.maven.apache.org
* 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.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1s
[!] Gradle threw an error while downloading artifacts from the network.
Retrying Gradle Build: #1, wait time: 100ms
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.getkeepsafe.relinker:relinker:1.4.5.
Required by:
project :app > io.flutter:flutter_embedding_debug:1.0.0-e672b006cb34c921db85b8e2f482ed3144a4574b
> Could not resolve com.getkeepsafe.relinker:relinker:1.4.5.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/getkeepsafe/relinker/relinker/1.4.5/relinker-1.4.5.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/getkeepsafe/relinker/relinker/1.4.5/relinker-1.4.5.pom'.
> repo.maven.apache.org
* 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.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1s
[!] Gradle threw an error while downloading artifacts from the network.
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
< /code>
Я попробовал следующее, чтобы решить проблему: < /p>
Изменил версию Gradle. < /li>
Ran Flutter Clean и Flutter Pub Get. < /li>
Перезапустил эмулятор.
Несмотря на эти шаги, ошибка сохраняется. Я не могу найти какие -либо решения, которые работают. Может ли кто -нибудь помочь мне в решении этой проблемы зависимости? ОС: Ubuntu Linux 22 < /li>
Android Studio версия: 2024.1 Koala < /li>
Flutter Version: Последняя < /li>
java версия : 21 < /li>
< /ul>
Конфигурация Gradle:
app/build.gradle
Код: Выделить всё
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.example.library_laravel"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
defaultConfig {
applicationId = "com.example.library_laravel"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
signingConfig = signingConfigs.debug
}
}
}
flutter {
source = "../.."
}
< /code>
settings.gradle:
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"
< /code>
Flutter Doctor Output:
> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.3, on Ubuntu 24.04.1 LTS 6.8.0-51-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2024.1)
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.3)
[✓] VS Code (version 1.96.4)
[✓] VS Code (version 1.96.4)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
< /code>
Any guidance on how to fix this issue would be much appreciated!
I expect to identify the cause of the dependency resolution failure, whether it's due to network issues, repository misconfiguration, or incompatible Gradle versions. I also expect guidance on how to fix the problem.
Подробнее здесь: https://stackoverflow.com/questions/793 ... e-task-fai