Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have this log from Android Studio gradle:

Error:A problem occurred configuring project ':ParseStarterProject'.
> Could not resolve all dependencies for configuration ':ParseStarterProject:_debugCompile'.
   > Could not find com.google.android.gms:play-services:7.5.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.5.0/play-services-7.5.0.pom
         https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.5.0/play-services-7.5.0.jar
     Required by:
         Parse:ParseStarterProject:unspecified

How in the world it can't look locally where it is (other projects clearly see and normally compile)?

    apply plugin: 'com.android.application'
apply plugin: 'com.parse'

buildscript {
  repositories {
    mavenCentral()
      jcenter()
    maven { url 'https://maven.parse.com/repo' }
  }
  dependencies {
    classpath 'com.parse.tools:gradle:1.+'
  }
}

dependencies {
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.parse.bolts:bolts-android:1.2.0'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile fileTree(dir: 'libs', include: 'ParseCrashReporting-*.jar')
}

android {
    compileSdkVersion 22
    buildToolsVersion "20"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 22
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            res.srcDirs = ['res']
        }
    }
}

/* Uncomment if you enable ProGuard and you want to automatically upload symbols on build.
parse {
  applicationId YOUR_APPLICATION_ID
  masterKey YOUR_MASTER_KEY

  // Make symbol upload automatic. Otherwise, use e.g. ../gradlew parseUploadSymbolsDebug;
  uploadSymbols true
}
*/

You mean that? There are two of these so I put the one in case.

edit: build.gradle (module)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

ext {
    compileSdkVersion = 22
    buildToolsVersion = "22"

    minSdkVersion = 9
    targetSdkVersion = 22
}
like image 441
jean d'arme Avatar asked Jun 12 '15 20:06

jean d'arme


3 Answers

Open SDK Manager and update Google Play services and Google Repository. Its works for me.

enter image description here

like image 121
Paulo Abreu Avatar answered Nov 23 '22 14:11

Paulo Abreu


i had the same issue today: i resolved simply by updating the google repository: Tools->android->SDK manager->Extras. When you have updated, you should be able to import use the dependence

like image 43
Botti Davide Avatar answered Nov 23 '22 14:11

Botti Davide


I solved my problem by change the dependencies

From

compile 'com.google.android.gms:play-services:7.5.0'

To

compile 'com.google.android.gms:play-services:7.8.0'

and update build tools from 22 to 23

like image 32
Benbeta Avatar answered Nov 23 '22 15:11

Benbeta