I am stuck a whole afternoon trying to run again my small Android/Kotlin application in Android Studio. The message pasted on this question topic suddenly nocked me down.
Please also check the PATH defined in environment variables is correct.
Open Command Prompt
Type ECHO %PATH% and press Enter Key
Check the path displayed on the screen
If the PATH is not correct, correct the same in Start - env - Environment Variables - Path