when you encounter this error, it means that flutter cannot find the SDK in your system. You can install the android sdk manually on your operation system.
First, download SDK here: https://developer.android.com/studio skd-tools-windows-334XXXX.zip unzip it into one directory
Second, find the \tools\bin file and open cmd shell here. run “.\sdkmanager.bat “platforms;android-28” “platform-tools” “build-tools:28.0.3” to install all the required components
Third, copy the generated files “tools” “platforms” “build-tools” “platform-tools” into your android sdk directory
Finally, if needed, “flutter doctor –android-licenses”