This issue is because of ADB configuration:
I have changed my laptop recently and forgot to configure Android sdk in Environment variables.
Possibilities:
- You might Not configured environment variable in windows/mac for Android sdk and android platform tools as well
- This can be tested by typing adb in new command prompt window. If the command is not reorganized. You will be able to see adb is not recognized as an internal or external. To fix the issue configure Environment variable as below. command
- Configure Environment variable -> system Variables -> path -> new -> C:\\Users\\username\\AppData\\Local\\Android\\Sdk (Path depends as it placed in your system) C:\\Users\\username\\AppData\\Local\\Android\\Sdk\\platform-tools (Path depends as it placed in your system) Restart the system - Type adb in command prompt - adb should reorganized
- There may be problem also in device connectivity like cable may be loose or USB problem or anything else. Check and ensure device is connected by typing adb command new command prompt window.
Once the device is recognized then try deploying flutter project again it will work.