the problem with android licenses
and when i tried fixing it the problem was in java
when I typed flutter doctor
[√] Flutter (Channel stable, 3.7.1, on Microsoft Windows [Version 10.0.22621.1105], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.6)
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.75.0)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
and when I typed
flutter doctor --android-licenses
this error appears
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
so can someone help:face_with_monocle: note :the java and javac on my pc are the same version
3
Answers
run this command in the command prompt
and type y and enter when you are asked.
and as you mentioned you are getting error here is the solution for your error that is given at another question https://stackoverflow.com/a/31523756/14466860 check out this
I started noticing these errors after upgrading to macOS 13. However I suspect they started after I upgraded to Android Studio Electric Eel (2022.1).
flutter doctor
was reporting the following:I symlinked the jbr director to jre according to this answer. This resolved both complaints. No other action was required.
For me the solution working downloading latest version of java and update path to new jdk