LoginSignup
2
1

More than 3 years have passed since last update.

Firebase App Distribution で App Distribution found more than 1 output file for this variant のエラーが出たときの対応

Last updated at Posted at 2019-11-25

はじめに

Firebase App Distribution の appDistributionUpload の Gradle task を実行した際に

== BUILD FAILED ==

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:appDistributionUploadXxxYyy'.
> App Distribution found more than 1 output file for this variant. Please contact firebase-support@google.com for help using APK splits with App Distribution.

が表示された場合の解決方法です。
(APK splits を行っている Android project で再現します。)

原因

ビルドを行うと複数の apk ファイルが生成され、どの apk ファイルがアップロード対象かどうかが特定できないためです。

対応

build.gradle の distribution properties に apkPath を指定する。

例)

buildTypes {
    release {
        ...
        firebaseAppDistribution {
            apkPath = "app/build/outputs/apk/xxxYyy/debug/xxx.apk"
        }
    }
}

productFlavors を設定している場合は、もう少し工夫が必要そう。。。

※仕様に明記されていないので、サポートされなくなる可能性もあります。
【追記:2020/05/11】
英語のドキュメントには apkPath が記載されていました。
https://firebase.google.com/docs/app-distribution/android/distribute-gradle?hl=en#step_3_configure_your_distribution_properties
(日本語はまだでした…)
※Gradle Plugin 1.2.0 で動作確認済み

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1