admin管理员组

文章数量:1415697

How to solve this error please help! I'm using Flutter 3.27.2 version . I set "distributionUrl=file:/c:/gradle/wrapper/dists/gradle-8.3-all.zip" on gradle-wrapper.properties file because if I don't set distributionUrl local file path, it doesn't work in my country. Here is my error in this picture. And here are codes on settings.gradle file :

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
    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")
}
plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.1.0" apply false
    id ".jetbrains.kotlin.android" version "1.9.0" apply false
}

include ":app" 

and here are codes on android\build.gradle file:

buildscript {
   repositories {
       google()
       mavenCentral()
       gradlePluginPortal()
   }
   dependencies {
       classpath "com.android.tools.build:gradle:8.1.0"
       classpath ".jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
   }
}

here is my error in this picture (link) enter image description here

本文标签: androidFlutter Gradle not working on local file pathStack Overflow