【发布时间】:2016-08-20 11:17:26
【问题描述】:
只是尝试更新到最新的 google play services 9.4.0。如果我将应用程序级别 gradle 中的类路径保留为 2.1.2,这似乎是截至 6 月 3 日的最新版本,link,我得到错误无法解决:
错误:无法解决:com.google.android.gms:play-services-measurement:9.4.0 安装存储库并同步项目
我已经在 SDK 管理器中更新了我的包。 如果我将类路径保留为 3.0.0,即 5 月发布的版本,情况似乎没问题。知道为什么我会在 2.1.2 版本的类路径中出现这样的错误吗?请参阅下面的我的 gradle 文件。 Android Studio 版本:2.1.3。感谢任何帮助。
build.gradle 项目级别:
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.google.gms:google-services:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle 应用级别:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.example.main.projectone"
minSdkVersion 18
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.facebook.android:facebook-android-sdk:4.7.0') {
exclude module: 'bolts-android'
}
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.parse:parse-android:1.13.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.firebase:geofire-android:2.0.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.firebase:firebase-storage:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
标签: android-studio gradle google-play-services