【发布时间】:2017-11-12 00:22:44
【问题描述】:
我正在尝试在我的移动应用程序中使用 google 登录,但在遵循 google 的教程后出现以下错误。
“无法解析:com.google.android.gms:play-services-auth:11.6.0”
我的 gradle 文件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
另一个是:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.myapp.myapp"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-auth:11.6.0'
}
那么这里出了什么问题以及为什么我无法构建项目?
【问题讨论】:
-
参考设置指南:注意关于插件和 maven 存储库放置的大写 cmets:firebase.google.com/docs/android/setup
标签: android google-api android-gradle-plugin google-signin