Hi,
I have a similar problem, so that I just jump in the thread rather than creating a new one.
I work with Android Studio on Flutter apps. I seem to need to upgrade gradle from 7.3.0 to 8.5. Naturally, I’m not that experienced otherwise I would probably know what to do.
My settings.gradle file is
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
    }
    settings.ext.flutterSdkPath = flutterSdkPath()      
    includeBuild("${settings.ext.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.5" apply false
    id "org.jetbrains.kotlin.android" version "1.9.23" apply false
    id "com.google.gms.google-services" version "4.4.1" apply false
    id "com.google.firebase.crashlytics" version "2.9.9" apply false
}
include ":app"
My gradle-wrapper.properties file is
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
After having changed 7.3.0 to 8.5 and 8.5-bin, I ran main.dart and got the following error message
Launching lib\main.dart on SM A705FN in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* Where:
Settings file 'C:\Users\PJPAC\Desktop\Dev-Practise\AndroidStudio\dev_flutter\luni_fixing\android\settings.gradle' line: 22
* What went wrong:
Plugin [id: 'com.android.application', version: '8.5', 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.5')
  Searched in the following repositories:
    Google
    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 2s
Error: Gradle task assembleDebug failed with exit code 1
I got almost the same message when in the terminal I ran
\app\android>./gradlew wrapper --gradle version 8.5
The only difference is
* Where:
Settings file 'C:\...\android\settings.gradle' line: 22
This line corresponding to
id “com.android.application” version “8.5” apply false
I can see that C:\Users\PJPAC.gradle\wrapper\dists includes a folder gradle-8.5-bin
I would love to provide the “build --scan URL” you’ve asked mTd ; however, I don’t know how to proceed (I did mentioned that I lack experience) and the 3 terms build/scan/URL are to generic for google to return any relevant answer. Naively, I’ve tried
flutter build --scan
but “scan” is not an option.
Could you please clarify how to proceed to provide you with “build --scan URL” ?
Many Thanks