🐙
FlutterでFirebaseの環境毎設定でMultiple commands produce ~が出るようになってしまった場合
Flutterでdev/stg/prodごとにFirebase用の設定ファイルであるGooleService-Info.plist
を生成するコードを弄っていたら下記のようなのエラーが出るようになってしまった。
error: Multiple commands produce '/Users/~/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist':
1) Target 'Runner' (project 'Runner') has copy command from '/Users/~/ios/Runner/dev/GoogleService-Info.plist' to '/Users/~/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'
2) Target 'Runner' (project 'Runner') has copy command from '/Users/~/ios/Runner/stg/GoogleService-Info.plist' to '/Users/~/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'
どうもGooleService-Info.plist
を削除したり入れ替えたりしてるうちにファイルが重複してしまったようだ。
解決方法としては、Runner
> TARGETS(Runner)
> Build Phases
の Copy Bundle Resources
に登録してあるGoogleService-Info.plist
を全て削除すれば良い。
その後またビルドすれば元通りになる。
Discussion