The Java path and the error I received are mentioned below. and i set JAVA_HOME correctly sdk version. Maybe flutter sdk old ?
1.
C:UsersASUS>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.19045.4894], locale tr-TR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.3)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.94.0)
[√] Connected device (3 available)
[√] Network resources
! Doctor found issues in 1 category.
C:UsersASUS>flutter doctor --android-licenses
Java version 17 or higher is required.
To override this check set SKIP_JDK_VERSION_CHECK
C:UsersASUS>java -version
java version "19" 2022-09-20
Java(TM) SE Runtime Environment (build 19+36-2238)
Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)
C:UsersASUS>where java
C:Program FilesJavajdk-19binjava.exe
2
Answers
It looks like Flutter is not recognizing your Java version correctly. You should try some of the steps below to resolve the issue:
JAVA_HOME
: Ensure it points to the JDK 19 installation directory.Path
variable: Make sureC:Program FilesJavajdk-19bin
is correctly added to yourPath
environment variable.