“android License Status Unknown” In Flutter Doctor
I am getting an error with Android Sdk when I run flutter doctor on command-line Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v1.4.9-hot
Solution 1:
Here's what worked for me
Fix 1:
- Launch Android studio & Open the SDK manager (Top-right of Android studio)
- Navigate to SDK Tab and look for Android SDK Platform-Tools
- If it's checked, unchecked it and click 'Apply' (We're trying to uninstall the previous version)
- Now the "SDK Tools" is uninstalled. Let's re-install it by checking the box and clicking 'Apply'
- Hit Ok & Restart Android studio
- Navigate to SDK install location at
%USERPROFILE%\AppData\Local\Android\Sdk
for windows, you should see a new foldertools
Note: If you don't see thetools
folder don't panic, i got you covered. - Open the
tools
folder & navigate tobin
- Copy the folder path (i.e
C:\Users\USERNAME%\AppData\Local\Android\Sdk\tools\bin
) - Add that path to Environmental variables
- Now you should have access to
sdkmanager
in the command-line. Try it out by typingsdkmanager
& hitting enter in CMD. - If you get
'sdkmanager' is not recognized as an internal or external command, operable program or batch file.
you probably made a mistake while adding the path to System Environmental Variables. Fix that. - Go to Flutter sdk folder (i.e
c:/src/flutter
) & launch theflutter_console.bat
file - Now type the command
flutter doctor --android-licenses
and it should work. Accept all by typingy
and hitting ENTER - And don't forget to run
flutter doctor
Fix 2:
PS: Only if Fix 1 does not work for you!
- Open your browser & goto Command line tools only (bottom of the page)
- Download the appropriate package for your platform
- Unzip it & Yes! You should see the
tools
folder After extraction, copy the
tools
folder toC:\Users\USERNAME%\AppData\Local\Android\Sdk
Now the same as Fix 1 above,
Open the
tools
folder & navigate tobin
- Copy the folder path (i.e
C:\Users\USERNAME%\AppData\Local\Android\Sdk\tools\bin
) - Add that path to Environmental variables
- Now you should have access to
sdkmanager
in the command-line. Try it out by typingsdkmanager
& hitting enter in CMD. - If you get
'sdkmanager' is not recognized as an internal or external command, operable program or batch file.
you probably made a mistake while adding the path to System Environmental Variables. Fix that. - NO you're not done
- The SDK Platform tools you downloaded is probably outdated (as you can see when you run the
sdkmanager
command from the command-line) - Now let's handover to Android Studio to do the rest. Restart Android Studio, so it can recognize the
tools
folder you added. - After Restart, Android Studio should automatically detect the outdated Platform-tools and prompt you to update (You must be connected to the internet!).
- IF UPDATE PROMPT DOES NOT SHOW UP
- Open SDK Manager in Android studio,
- Go to UPDATES
- Click
Check Now
- And you should get the PROMPT to update Platform-Tools
Fix 3:
- Do everything in Fix 2
- Open Environmental Variables, Create a new Variable
JAVA_HOME
and set the value to the JRE/bin (get it from Android studio install location in Program Files) - Open the command line type
set JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
for windows &export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
for Linux
And that's it you can now run flutter doctor --android-licenses
on the command-line; Accept all licenses by typing y
and hitting ENTER. And don't forget to run flutter doctor
Post a Comment for "“android License Status Unknown” In Flutter Doctor"