0

Ok so I am trying to add ads to my application and it tells me to add this line of code in my build.gradle file.

Error image:

Error image

compile 'com.google.android.gms:play-services:11.2.0'

As you can see in this image at the bottom it says

  Failed to resolve:compile 'com.google.android.gms:play-services:11.2.0'

I cannot click Install repository and sync project because when I do it does nothing. Does not even open another windows or anything?

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
John Solly
  • 31
  • 5

2 Answers2

0

try adding

maven { url 'https://maven.google.com' }

to your project level gradle file

Dreamers Org
  • 1,151
  • 3
  • 12
  • 30
0

Try doing these steps,

1)Either you are missing maven link

    `repositories {
     maven {
            url "https://maven.google.com"
           }
     }`

2) Try updating to your google repository in Android SDK

Start Android Studio -> On the Tools menu, click Android > SDK Manager. Update the Android Studio SDK Manager: click SDK Tools, expand Support Repository, select Google Repository, and then click OK.

Harish Rn
  • 98
  • 1
  • 9