Home > Net >  Flutter does not find android sdk - vdcode Ubuntu
Flutter does not find android sdk - vdcode Ubuntu

Time:02-04

I'm trying to setup vscode for flutter development in Ubuntu, but I'm having an issue locating android SDK and accepting the licenses. I installed android studio and ticked everything in SDK manager, then changed flutter config to the android SDK path , but still same error.

--> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on Ubuntu 20.04.3 LTS 5.13.0-25-generic,
    locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.1)
    ✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3
      To update the Android SDK visit
      https://flutter.dev/docs/get-started/install/linux#android-setup for
      detailed instructions.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.63.2)
[✓] Connected device (1 available)

when trying to accept license , I get this

--> flutter doctor --android-licenses
Android sdkmanager not found. Update to the latest Android SDK and ensure that
the cmdline-tools are installed to resolve this.

CodePudding user response:

It seems that u have Android SDK version 27 but Flutter requires 29.

So u should instal required sdk or higher version.

CodePudding user response:

I had to restart my laptop, then ran again this command inside vscode terminal flutter config --android-sdk "PATH TO ANDROID SDK" , now it works!

  •  Tags:  
  • Related