Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find com.google.android.gms:play-services:8.4.0

I have Android project and when run ./gradlew dependencies command, I get the following error and I cannot figure out how to use Google Play Service 8.4.0. (8.3.0 works)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find com.google.android.gms:play-services:8.4.0.
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         https://jcenter.bintray.com/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
         https://maven.fabric.io/public/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         https://maven.fabric.io/public/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
         https://zendesk.artifactoryonline.com/zendesk/repo/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         https://zendesk.artifactoryonline.com/zendesk/repo/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
         https://repo1.maven.org/maven2/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         https://repo1.maven.org/maven2/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
         file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
         file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
         file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar

Here is how the app gradle file looks like.

  dependencies {
      ....
      compile 'com.google.android.gms:play-services:8.4.0'
      ....
  }

I have've tried to put the following in a project gradle file but didn't work help.

    dependencies {
      classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
      classpath 'com.google.gms:google-services:2.0.0-alpha3'
    }

Could anyone help me to debug further?

like image 867
kimh Avatar asked Feb 01 '16 07:02

kimh


1 Answers

A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.google.android.gms:play-services:8.4.0.

Post your total build.gradle

  1. Use Latest versions of build tools
  2. Then call classpath 'com.android.tools.build:gradle:2.0.0-alpha3'

Finally

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId ""
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

Check Version conflict updating to 8.4.0

like image 118
IntelliJ Amiya Avatar answered Sep 17 '22 14:09

IntelliJ Amiya