Reputation: 4343
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
}
Upvotes: 21
Views: 26745
Reputation: 536
Open SDK Manager and update Google Play services and Google Repository. Its works for me.
Upvotes: 27
Reputation: 1
I had this problem like yesterday and nothing seemed to work: I had Android Support Repository and Google Play Services up to date and everything...
Turns out the environment variable ANDROID_HOME was pointing to the wrong folder when looking for the android sdk folder. To change that I had to set it right in the .profile file at the root of my MacBook.
Here's the syntax to do so : export ANDROID_HOME='/Users/SteeveO/Library/Android/sdk'
Hope it helps someone in the future!
Upvotes: 0
Reputation: 6369
In my case Android Studio said that Play Services 9.4.2 was available, and I got same error. Then I changed to version 9.4.0 which was indicated in official docs. And error disappeared.
Upvotes: 0
Reputation: 19
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
Upvotes: 2
Reputation: 41
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
Upvotes: 3
Reputation: 26978
You must download the appropriate SDK package in Android Studio as described in the docs.
Steps:
Upvotes: 1