Reputation: 2449
I am trying to install Flutter Enviroment and I found this error when I use this command:
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
instructions.
[√] Android Studio (version 3.6)
[√] VS Code (version 1.43.1)
[!] Connected device
! No devices available
So When I use flutter doctor --android-licenses
I found this error also:
A newer version of the Android SDK is required. To update, run:
C:\Users\DELL\AppData\Local\Android\Sdk\tools\bin\sdkmanager --update
When I tried to run this command C:\Users\DELL\AppData\Local\Android\Sdk\tools\bin\sdkmanager --update
I found this error:
Error: Could not find or load main class '-XX:+IgnoreUnrecognizedVMOptions
Caused by: java.lang.ClassNotFoundException: '-XX:+IgnoreUnrecognizedVMOptions
So any one knows hoe to solve this problem
Upvotes: 1
Views: 4267
Reputation: 69
Navigate in cmd to the needed folder. I think it was:
cd C:\Users\DELL\AppData\Local\Android\Sdk\tools\bin\sdkmanager --update
After this run the flutter doctor command.
Upvotes: 0
Reputation: 26
Go to the directory C:\Users\DELL\AppData\Local\Android\Sdk\tools\bin\
and then write the command:
sdkmanager --update
After that, run:
flutter doctor --android-licenses
Upvotes: 1
Reputation: 1400
You don't need to reinstall flutter. You should just go to android studio->sdk manager-> sdk tools-> clear tick from Hide Obsolete Packages and tick Android Sdk tools (Obsolete) in order to install. Finally it will be installed and you will able use flutter. P.s. Don't forget to run to flutter doctor) The Screenshot
Upvotes: 1