我有来自 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
它究竟如何无法在本地查看它所在的位置(其他项目可以清楚地看到并正常编译)?
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
}
*/
你是说那个?有两个,所以我把一个放在以防万一。
编辑:build.gradle(模块)
// 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
}
打开SDK管理器并更新Google Play 服务 and 谷歌存储库。它对我有用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)