google-java-format dependency syncing but not getting build.

1.4k views Asked by At

I have added mavenCentral() in rootProject build script. But its giving below error while build. Any idea on this.

You probably need to add a repository containing the '[com.google.googlejavaformat:google-java-format:1.5]' artifact in the 'build.gradle' of your root project.

E.g.: 'buildscript { repositories { mavenCentral() }}'

Note that included buildscripts (using 'apply from') do not share their buildscript repositories with the underlying project.

You have to specify the missing repository explicitly in the buildscript of the root project.

1

There are 1 answers

3
Emre Aktürk On

Do you have jcenter() as a repository in your build.gradle(project)?

There is already exist Google Java Format in JCenter