Reputation: 237
I am trying to use google play services for location purposes. Therefore I wanted to add google play services to my app. In build.gradle dependincies I added following line.
compile 'com.google.android.gms:play-services:9.0.1'
However it gives following error
Error:(25, 13) Failed to resolve: com.google.android.gms:play-services:9.0.1
I couldnt find which version of Google play services installed. In SDK Tools tab it says version 30.
I've tried following line too but it also gave same error
compile 'com.google.android.gms:play-services:30'
Edit: Here is the whole build.gradle file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "ozu.cs394.umurali.whereismycar"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:9.0.1'
}
Upvotes: 2
Views: 11418
Reputation: 1016
com.google.android.gms:play-services
Upvotes: 19
Reputation: 2828
Check your SDK Manager under Extras and make sure that Google Repository
is installed.
Upvotes: 0
Reputation: 2252
you should update google play services repository in sdk manager
:
Upvotes: 2