我将 Google 服务从 3.2.1 更新到 3.3.0,并开始收到以下错误
实现
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "com.google.gms:google-services:3.3.0" // <- Update
}
}
错误
More than one variant of project :asq-react-native-facebook-log-in matches the consumer attributes:
- Configuration ':asq-react-native-facebook-log-in:debugApiElements' variant android-aidl:
- Found artifactType 'android-aidl' but wasn't required.
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required default 'development' but no value provided.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
这个错误发生在我的主项目中,但是错误本身指的是这个项目 https://github.com/Asimetriq/asq-react-native-facebook-log-in/tree/master/android (这是我的主项目中的依赖项之一)
错误的 - Configuration
位重复了几次(相同的内容,为了保持简洁而没有将其包含在此处。)
最佳答案
关于java - Google 服务 3.3.0 升级错误 - 多个项目变体匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50422651/