java - Google 服务 3.3.0 升级错误 - 多个项目变体匹配

标签 java android gradle google-play-services-3.3.0

我将 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 位重复了几次(相同的内容,为了保持简洁而没有将其包含在此处。)

最佳答案

根据这个answer ,有一个known bug使用 Google 服务 3.3.0

使用修复了错误的 4.0.1 版本或降级到 3.2.1

关于java - Google 服务 3.3.0 升级错误 - 多个项目变体匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50422651/

相关文章:

android - 压缩对齐 : command not found

android - 将 Facebook 集成到 android 中的步骤

android - 成功生成apk后运行python脚本

jenkins - gradle返回构建成功后失败

java - 在 ubuntu Precision 64 上使用 apt-get 安装 JDK

java - 带有 c3p0 的 spring JPA 在第一次请求时连接超时

android - 在一行android上创建一个包含多个参数的列表

android - 如何在Android Studio中成功同步?

java - 用于 XML 解析的 JAXB 替代方案

java - 当有超过 1 个 tomcat 运行时如何分配 jvm 内存