Android Studio introduced a new way to define repositories. If you have the dependencyResolutionManagement block in your settings.gradle, then you need to add the jitpack repository there instead of using the allprojects block
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Maybe the documentation should be updated too.