You can also just execute
$ANDROID_HOME/tools/bin/sdkmanager –licenses
Or for Windows execute
%ANDROID_HOME%/tools/bin/sdkmanager –licenses
— OR —
C:\Users{your-username}\AppData\Local\Android\sdk\tools\bin\sdkmanager –licenses
(credit for windows command to @puneet-kumar)