On adding the google or maven repositories for all projects in the gradle file can given error. Adding below: allprojects { repositories { google() mavenCentral() } Gives below error: Solution: Goto Settings.gradle file: And add the lines as below if not added: google() and mavenCentral() repositories added: