با سلام و وقت بخیر خدت استاد گرامی ممنون بابت دوره خوبتون
بنده در هنگام اجرای برنامه به صورت Debug روی گوشی با این مشکل مواجه میشوم و هر چقدر هم در ابزارهای هوش مصنوعی دنبال دلیل گشتم با راهنمایی های هر کدومشون هم نتوانستم کاری از پیش ببرم
flutter run
Launching lib\main.dart on SM S721B in debug mode...
FAILURE: Build failed with an exception.
* Where:
Settings file 'D:\caliditapp\android\settings.gradle.kts' line: 20
* What went wrong:
Plugin [id: 'com.android.application', version: '8.3.2', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.3.2')
Searched in the following repositories:
MavenRepo
Gradle Central Plugin Repository
* 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 3s
Running Gradle task 'assembleDebug'... 4.3s
Error: Gradle task assembleDebug failed with exit code 1
یکی از دانشجویان دیگر هم همین مشکل رو داشت ولی راه حلش رو ارائه نکرده بودید....
این هم محتوای فایل wrapper
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
و این هم محتوای فایل settings
luginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
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.3.2" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")