Unreal 4.17 Gradle Pack Error you need to accept the license?

When you turn on the Enable Gradle option it should have asked you to accept the license. If you don’t it won’t generate the license key. You can toggle it off and back on to see it again if the file doesn’t exist.

This file is android-sdk-license in your android-sdk-windows/licenses directory. If it worked properly it will contain this:
8933bad161af4178b1185d1a37fbf41ea5269c55