'gradlew.bat' is not recognized as an internal or external command

Got it,

Add the file location to environment variable PATH

C:\Users\user\AppData\Local\Android\Sdk\tools\templates\gradle\wrapper


Another version of the @Kai Jie findings, that works for me.

Compiling previous answers I did the following to get Android SDK and gradle working (You need gradle working anyway to compile your Android project):

  1. Prerequisites. You have gradle installed in the folders like I found on my computer. Please, check it:

    C:\Program Files\Android\Android Studio\gradle\gradle-X.X\
    
  2. Set a new system variable (Control Panel\System and Security\System Advance system ->settings->environment variables-system variables). Do not forget to change a gradle version.

    GRADLE_HOME   C:\Program Files\Android\Android Studio\gradle\gradle-X.X\
    
  3. Add the following path to system paths (Control Panel\System and Security\System Advance system ->settings->environment variables-system variables):

    %GRADLE_HOME%\bin
    
  4. You might want to REBOOT your computer, to make sure, that the system sees the variables.

  5. Check if gradle works properly with the terminal commands

    $ gradle -v