If all of this fails to work for you, what worked for me was seeing what version of the Android Build Tools version it fails on. For example, in the log I saw this:
So I went to Android SDK Manager and found that Android Build Tools 28 wasn’t even installed. Garbage error reporting. Can’t have a license failure if the software isn’t even installed. This error made me think for 2 days it was a licensing issue. NOT!
Make sure that the version of things being used is in fact installed by checking the Android SDK Manager.
