Follow these simple steps.
- go to tools, then SDK manager, then click on android SDK.
- click SDK update sites tab.
- check the checkbox that states https://..sources to be fetched using https://.
- click apply and ok.
- Now restart android studio.
- go to SDK tools and check the checkbox that states Hide obsolete packages.
- wait for about a minute or so for the packages appear.
- then select a package called "android SDK tools (obsolete), and press okay.
- continue to install the package.
- after installation restart android studio and also restart cmd, then run flutter doctor.
- it will take a couple of minutes and it should work