I want to add the google play service to my project with gradle but every time I try to build/ run I get the following error:
Gradle: A problem occurred configuring project ':BPA App'.
Could not resolve all dependencies for configuration ':BPA App:_debugCompile'. Could not find com.google.android.gms:play-services:4.2.42. Required by: BPA App:BPA App:unspecified
My build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
// maven { url "http://dl.bintray.com/populov/maven" }
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.0.1'
compile 'com.android.support:appcompat-v7:19.0.1'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.google.android.gms:play-services:4.2.+'
}
Of course I have installed google repository and other things from the SDK-Manager.
The support-v4 and support-v7 libs works fine.
I´m new in builds with gradle. Before gradle I have imported the service-lib as a module and everything works.
Hope someone can help me.