ERROR: cmd.exe failed with args

Found a solution:

As enabling ANT instead of gradle gave me the same problem and all licences were already checked, I found an other solution:

  1. Go to NVPACK\android-sdk-windows\tools and run android.bat to execute the SDK-Manager (not the CodeWorks Manager)

  2. If anything is checked, deselect everything.

  3. Uninstall any installed Android SDK Build-tools

  4. Now install the Android SDK Build-tools with latest Revision (at the moment Rev. 28.0.3)

I also updated the Android SDK Tools and Android SDK Platform-tools

Now rebuild your Project and it should work without any errors!
Hope this is helpful