Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio - Task 'assemble' not found in project ':google-play-services_lib'

When I click Build -> Rebuild Project I get this error.

enter image description here

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" />
like image 999
cross_flame Avatar asked Jul 14 '14 08:07

cross_flame


1 Answers

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'
like image 135
Scott Barta Avatar answered Oct 06 '22 10:10

Scott Barta