org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':lib'

see
Going from Android Studio 2.3 to 3.3 now 3.4 and Gradle throws exception
for more / better details.