我正在尝试在依赖项节点中将“com.google.android.gms:play-services-auth:15.0.1”添加到我的项目中,并且在运行项目时出现错误,该错误是:错误:程序类型已存在:com.google.android.gms.internal.auth.zzas
我用谷歌搜索了它,我尝试了很多 stackoverflow 的答案,但没有一个能提供帮助,实际上没有一个人真正谈论我的具体问题,最后,我无法继续我的项目
这是应用程序 Gradle:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-auth:15.0.1' // Make the error!
implementation 'com.google.firebase:firebase-config:15.0.2'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
.... }
顶级梯度:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.google.com/' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我希望编译我的项目并使用“play-services-auth”库,但我的项目无法编译,谢谢!