[!] Android toolchain - develop for Android devices (Android SDK 27.0.3) >>• Android SDK a ..\\Android\\sdk • Android NDK location not configured (optiona
If you updated the android SDK, the licenses may have changed. Depending on how you did the update you may or may not have been prompted to accept the changes, or maybe it just doesn't save the fact that you did accept them in a way flutter can understand.
To resolve, try running
flutter doctor --android-licenses
This should prompt you to accept licenses (it may ask you first, in case just type y
and press enter - although it should tell you that).
If you still have problems after doing that, it might be worth either opening a new bug in the Flutter Github repository, or adding a comment on an existing issue like this one as it may be what you're seeing.
This line provided on GitHub issue community fixed my problem, here it is just in case it helps anyone else.
@rem Execute sdkmanager
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee %JAVA_OPTS% %SDKMANAGER_OPTS% -classpath "%CLASSPATH%" com.android.sdklib.tool.sdkmanager.SdkManagerCli %CMD_LINE_ARGS%
Try downgrading your java version, this will happen when your systems java version isn't compatible with the one from android. Once you changed you the java version just run flutter doctor
it will automatically accepts the licenses.
Just install the sdk command line tool(latest) the below in android studio.
open the flutter_console.bat file from the flutter SDK root folder and run the command
flutter doctor --android-licenses
it will accept the licenses of newly downloaded updates of Android SDK. You need to run it every time whenever you download and update the Android SDK.
In my case the issue was missing Android SDK Command-line tools