Код: Выделить всё
The supplied phased action failed with an exception.
A problem occurred configuring root project 'android'.
Build file 'C:\Users\nicholdw\FlutterPractice\namer_app\flutter_application\android\build.gradle.kts' line: 16
A problem occurred configuring project ':app'.
Build file 'C:\Users\nicholdw\FlutterPractice\namer_app\flutter_application\android\app\build.gradle.kts' line: 1
An exception occurred applying plugin request [id: 'com.android.application']
Failed to apply plugin 'com.android.internal.application'.
Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in C:\Program Files\Microsoft\jdk-11.0.27.6-hotspot
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.Java(0)
< /code>
build.gradle.kts Файл: < /p>
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean") {
delete(rootProject.layout.buildDirectory)
}
< /code>
строка 16 build.gradle.kts, где ошибка: < /p>
project.evaluationDependsOn(":app")
< /code>
gradle.properties Файл: < /p>
org.gradle.java.home=C:/Program Files/Java/jdk-24/
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
», но Я не могу выяснить, где C: \ Program Files \ Microsoft \ jdk-11.0.27.6-hotspot ссылается.>
Подробнее здесь: https://stackoverflow.com/questions/796 ... -are-curre