on Windows:
cd "%ANDROID_HOME%"/tools/bin
Run the sdkmanager as follows:
sdkmanager --licenses
And accept the licenses you did not accept yet (but need to).
For more details see the Android Studio documentation, although the current documentation is missing any description on the --licenses option.
Thanks for this. We normally advise people install android studio and run through the install process which should provide a UI for this. However this is equally acceptable.
Hhi. To prevent additional searching add to your dicumentation commands to agree android license agreement
https://stackoverflow.com/questions/39760172/you-have-not-accepted-the-license-agreements-of-the-following-sdk-components