Can't solve problem with android plugin and gradle in flutter

I create a new project. Then have this problem:

The supplied phased action failed with an exception. A problem occurred configuring root project 'android'. A problem occurred evaluating root project 'android'. A problem occurred configuring project ':app'. Build file 'C:\wolk\flutter\calcul\android\app\build.gradle' line: 2 Plugin [id: 'com.android.application', version: '7.3.0'] was not found in any of the following sources:

* Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
* Included Builds (None of the included builds contain this plugin)
* Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.3.0') Searched in the following repositories: Gradle Central Plugin Repository Plugin [id: 'com.android.application', version: '7.3.0'] was not found in any of the following sources:
* Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
* Included Builds (None of the included builds contain this plugin)
* Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.3.0') Searched in the following repositories: Gradle Central Plugin Repository

I tried first updating jdk, then reinstalling jdk and Android studio, changing the information in build.gradle, nothing helps

You miss the google() repository as plugin repository in your settings script.
The Android plugins are not available on the Gradle Plugin Portal.

it is among the repositories :thinking:

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

It might be in your dependency repositories, but that’s not the point.
You do not try to resolve a dependency, but a plugin.
Those are the repositories defined within pluginManagement { ... } in your settings script.

do you mean this?

P.S. after the Java update, the error in build.gradle disappeared, but shows the settings.gradle error

Settings file 'C:\wolk\flutter\calcul\android\settings.gradle' line: 9

* What went wrong:
A problem occurred evaluating settings 'android'.
> Could not find method fluterSdkPath() for arguments [] on object of type org.gradle.plugin.management.internal.DefaultPluginManagementSpec.

* 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.

Yes, as you can see in your screenshot, you do not define plugin repositories, so by default only the Gradle Plugin Portal is used and that does not contain the Android plugins.