this is my error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ‘classpath’.
> Could not find gradle-8.3.2.jar (com.android.tools.build:gradle:8.3.2).
> Searched in the following locations:
> https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.3.2/gradle-8.3.2.jar
> Could not find builder-8.3.2.jar (com.android.tools.build:builder:8.3.2).
> Searched in the following locations:
> https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/8.3.2/builder-8.3.2.jar
> Could not find bundletool-1.15.6.jar (com.android.tools.build:bundletool:1.15.6).
> Searched in the following locations:
> https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.15.6/bundletool-1.15.6.jar
> Could not find protos-31.3.2.jar (com.android.tools.analytics-library:protos:31.3.2).
> Searched in the following locations:
> https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/31.3.2/protos-31.3.2.jar
* 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.
this is my setting.gradle.kts:
pluginManagement {
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()
//
maven("https://maven.aliyun.com/repository/google")
maven("https://maven.aliyun.com/repository/public")
maven("https://maven.aliyun.com/repository/central")
maven("https://maven.aliyun.com/repository/gradle-plugin")
maven("https://maven.aliyun.com/repository/apache-snapshots")
maven("https://maven.myket.ir")
}
}
//
@SuppressSuppress(“UnstableApiUsage”)
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
//
maven("https://maven.aliyun.com/repository/google")
maven("https://maven.aliyun.com/repository/public")
maven("https://maven.myket.ir")
}
}
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 “1.9.24” apply false
}
include(“:app”)
this is my build. gradle.kts:
plugins {
id(“com.android.application”)
id(“org.jetbrains.kotlin.android”)
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = “com.example.flutter_application_1”
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
defaultConfig {
applicationId = "com.example.flutter_application_1"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
//
signingConfig = signingConfigs.getByName("debug")
}
}
}
flutter {
source = “../..”
}