0

Whenever I try to introduce a new Map Activity with a Google Maps API key, this error keeps showing up.

I have already checked the version of com.google.android.gms:play-services-maps:16.1.0 and ensured that it is the newest version. I have also tried installing repository and sync project but this error shows up "Could not find dependency "com.google.android.gms:play-services-maps:16.1.0""

build.gradle(Module file)

apply plugin: 'com.android.application'

...

dependencies {
    ...
    compile 'com.google.android.gms:play-services-maps:16.1.0'
}
Ong Jin Bin
  • 155
  • 3
  • 7

1 Answers1

1

May be you have not added maven to your project. Please check in project level gradle file.. if not please add as the following in

build.gradle(project:Your project)

allprojects {
    repositories {
        google()
        jcenter()
        maven(){
            url "https://maven.google.com"
        }




}

}

Rezaul Karim
  • 830
  • 8
  • 15