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

时间:2018-05-19 06:56:11

标签: 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位重复多次(内容相同,此处未包含此内容以保持清洁。)

1 个答案:

答案 0 :(得分:5)

根据此answerknown bugGoogle services 3.3.0

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