You need to accept the licenses through the terminal/prompt
e.g on linux:
cd ~/Library/Android/sdk/tools/bin/
Run the sdkmanager as follows:
./sdkmanager --licenses
e.g on Windows:
cd /d "%ANDROID_SDK_ROOT%/tools/bin"
Run the sdkmanager as follows:
sdkmanager --licenses
And accept the licenses you did not accept yet (but need to).