Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No valid Android SDK platforms

Tags:

flutter

When I write flutter doctor command in cmd I get this error.

No valid Android SDK platforms found in G:\SdkManager\platforms. Candidates were:
- android-21
- android-27
- android-28
- android-8.0.0

flutter doctor
flutter doctor

env
env

path
path

flutter sdk
flutter sdk

platforms
platforms

plugins
plugins

like image 947
Mahdi Avatar asked Dec 18 '22 19:12

Mahdi


2 Answers

It appears as though this message shows up when you don't have any build-tools packages installed. At the time of writing, to install the minimum required versions, you can fix this issue with:

sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.3"
like image 181
AldaronLau Avatar answered Feb 08 '23 04:02

AldaronLau


I've set up my Android SDK manually on Windows 10 with the command line and I was able to solve this kind of errors while I tried to set up my development environment, if you want to solve it as I did, just follow the next steps that I posted in a GitHub Comment in a related issue:

https://github.com/flutter/flutter/issues/19805#issuecomment-478306166

like image 20
Ipereto Avatar answered Feb 08 '23 06:02

Ipereto