You need an additional block at the top level after your apply plugin
line:
repositories {
mavenCentral()
}
In general, you need a repositories
block at the same level as any dependencies
block (hence why you also need one in the buildscript
block).
Most of the time, you'd move your buildscript
block to the top level build.gradle
(so that all your modules use the same gradle build) rather than have them both at the module level.