แก้ปัญหา Error: Flutter requires Android SDK 29 and the Android BuildTools 28.0.3

C:\Users\permpolt>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.16299.2045], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.3)
    X 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/windows#android-setup for detailed instructions.
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code, 64-bit edition (version 1.55.2)
[√] Connected device (2 available)

! Doctor found issues in 1 category.

วิธีแก้ไข

ไปที่ SDK Manager Android SDKSDK platforms

ภาพ

เลือก Android 10.0

กด OK
ภาพ

C:\Users\permpolt>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.16299.2045], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code, 64-bit edition (version 1.55.2)
[√] Connected device (2 available)

• No issues found!