When I click Build -> Rebuild Project
I get this error.
Everyrithing is fine with the map. I successfully sync build.gradle and clean project without errors. And I can run on my device the map.
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.0'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:20.0.0'
compile 'com.google.android.gms:play-services:5.0.77'
}
android {
compileSdkVersion 20
buildToolsVersion '20'
defaultConfig {
minSdkVersion 10
targetSdkVersion 20
}
}
Manifest.xml
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
You have a reference to google-play-services_lib
in your settings.gradle file. Unless you have a module in a directory called "google-play-services_lib" off of your project root, which I assume you don't, then remove this bit from your settings file. The correct way to add a dependency on Play Services is not by adding this to your settings file, but by a compile
statement in your dependencies
block of your build.gradle file, as you have already done:
compile 'com.google.android.gms:play-services:5.0.77'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With