Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Instant App上多个版本变体的Firebase版本错误_Android_Firebase_Android Instant Apps - Fatal编程技术网

Android Instant App上多个版本变体的Firebase版本错误

Android Instant App上多个版本变体的Firebase版本错误,android,firebase,android-instant-apps,Android,Firebase,Android Instant Apps,我正在将Firebase添加到具有3种构建类型(调试、暂存和发布)的现有应用程序中。还有两种风格(live和mock),但我只为调试版本启用mock: android.variantFilter { variant -> if ((variant.buildType.name.equals('release') || variant.buildType.name.equals('staging')) && ((variant.getFlavo

我正在将Firebase添加到具有3种构建类型(调试、暂存和发布)的现有应用程序中。还有两种风格(live和mock),但我只为调试版本启用mock:

android.variantFilter { variant ->
    if ((variant.buildType.name.equals('release') || variant.buildType.name.equals('staging'))
            && ((variant.getFlavors().get(0).name.equals('mock')))) {
        variant.setIgnore(true);
    }
}
因此有3个应用程序ID:me.app(发布)、me.app.debug(调试)和me.app.staging(暂存)。很明显,只有一个应用程序可用于调试,尽管有两个变体(debugLive和debugMock)

在Firebase上,我创建了1个项目并添加了3个应用程序-每个应用程序ID添加1个。到目前为止,我没有为这些应用程序中的任何一个提供SHA1密钥。我下载了google-services.json并将其放在基本功能模块的根目录中

我现在无法将项目与Gradle同步:

More than one variant of project :myapp-base-feature matches the consumer attributes:
  - Configuration ':myapp-base-feature:mockDebugApiElements' 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 'mockDebug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required mocking 'mock' and found compatible value 'mock'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
  - Configuration ':myapp-base-feature:mockDebugApiElements' variant android-classes:
      - Found artifactType 'android-classes' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
      - Found com.android.build.api.attributes.VariantAttr 'mockDebug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required mocking 'mock' and found compatible value 'mock'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
  - Configuration ':myapp-base-feature:mockDebugApiElements' variant android-manifest:
      - Found artifactType 'android-manifest' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
      - Found com.android.build.api.attributes.VariantAttr 'mockDebug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required mocking 'mock' and found compatible value 'mock'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
  - Configuration ':myapp-base-feature:mockDebugApiElements' variant android-renderscript:
      - Found artifactType 'android-renderscript' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
      - Found com.android.build.api.attributes.VariantAttr 'mockDebug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required mocking 'mock' and found compatible value 'mock'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
  - Configuration ':myapp-base-feature:mockDebugApiElements' variant jar:
      - Found artifactType 'jar' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
      - Found com.android.build.api.attributes.VariantAttr 'mockDebug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required mocking 'mock' and found compatible value 'mock'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.

将你的谷歌服务降级到3.2.1 这是一个已知的bug,至少在3.3.1版本(可能是3.3版本)中有味道和子模块+

  dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.31"
        classpath 'com.google.gms:google-services:3.2.1' 
        classpath 'io.fabric.tools:gradle:1.25.4'
    }

你能分享一个问题追踪者的链接吗?这将有助于我们在将来移动到最新版本。对不起,我在大约一个月前遇到了它,我没有保存链接。我再也不确定这个链接了。花了很多时间在谷歌上搜索才找到问题。我确定问题和修复,但不确定问题跟踪号或解决时的预计到达时间。希望在他们的下一个补丁中。希望我能指出你在那里,但现在找不到它,所以你将不得不通过谷歌做一些戳运行到它。