Я также создал новый проект Flutter и тот же Появляется несоответствие совместимости между Java и Gradle. Ошибка сохраняется, несмотря на переход на Java 17.
Кто-нибудь сталкивался с подобной проблемой или знает, как ее решить?
Код: Выделить всё
PS D:\programming\android\test> flutter run
Launching lib\main.dart on SM G610F in debug mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\programming\android\test\android\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'org' for root project 'android' of type org.gradle.api.Project.
* 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 5s
Running Gradle task 'assembleDebug'... 6.2s
Error: Gradle task assembleDebug failed with exit code 1
Код: Выделить всё
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-IN)
• Flutter version 3.24.3 on channel stable at C:\flutter\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (6 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\karti\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Java\jdk-17\bin\java
• Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] IntelliJ IDEA Community Edition (version 2024.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.2.3
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin version 242.22855.32
[√] VS Code (version 1.94.2)
• VS Code at C:\Users\karti\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.99.20240930
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4317]
• Chrome (web) • chrome • web-javascript • Google Chrome 130.0.6723.59
• Edge (web) • edge • web-javascript • Microsoft Edge 130.0.2849.46
[√] Network resources
• All expected network resources are available.
Код: Выделить всё
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
}
Код: Выделить всё
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
}
Код: Выделить всё
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
Подробнее здесь: https://stackoverflow.com/questions/791 ... e-org-grad