Reputation: 391
I think I miss something about mavenCentral()
thanks a lot
that's error message :
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method mavenCentral() for arguments [] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I also add to buildscript
maven {
url 'https://maven.google.com/'
}
but same error again.
Upvotes: 1
Views: 3074
Reputation: 364928
The mavenCentral()
is a repo (the central Maven repository), not a dependency.
Move the mavenCentral()
in the buildscript/repositories
block.
buildscript{
repositories {
google()
jcenter()
mavenCentral()
}
...
}
Upvotes: 0
Reputation: 311
Place it in repositories
block, not dependencies
:
repositories {
google()
jcenter()
mavenCentral() //here
}
Upvotes: 1