“Firebase.xcconfig”的文件引用是多个组(“支持文件”和“支持文件”)的成员;这表明一个畸形的项目

i6x*_*x86 5 ios firebase flutter

我有这个问题,找不到更多相关信息。整个消息说:

xcodebuild[41239:2858194] 警告:“Firebase.xcconfig”的文件引用是多个组(“支持文件”和“支持文件”)的成员;这表明一个畸形的项目。只会保留其中一个组中的成员资格(但目标中的成员资格不受影响)。如果您想在多个组中引用同一个文件,请添加另一个对同一路径的引用。

到目前为止,我尝试过:

  • 清理 Pod 缓存
  • 删除 Podfile.lock
  • 删除 ~/Library/Developer/Xcode/DerivedData/*
  • 分解吊舱
  • 删除 ~/Library/Caches/CocoaPods
  • 扑干净

没有改变。问题仍然存在。

我的 Podfile 是:

# Uncomment this line to define a global platform for your project

platform :ios, '9.0'
use_modular_headers!

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks!
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

谁能帮我这个?

PD。我有这个警告:

/Users/some/path/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+6/ios/Classes/FirebaseCorePlugin.m:8:9: 致命错误:'Firebase/Firebase. h' 文件未找到 #import ^~~~~~~~~~~~~~~~~~~~~~ 产生 1 个错误。注意:使用新构建系统注意:规划构建注意:构建构建描述

......还有这个:

这款 iPhone 7(型号 1660、1778、1779、1780)运行的是 iOS 12.4 (16G77),此版本的 Xcode 可能不支持。

但是由于我使用的是 iPhone 模拟器而不是真正的设备,所以最后一个在某种程度上无关紧要。

编辑:一些可能有帮助的更多信息。当我运行 pod update 时,我得到这个:下载依赖项

安装 Firebase 2.5.1
安装 Firebase 6.5.0(原为 2.5.1)

显然安装了 2 个版本的 Firebase,但我不知道为什么会发生这种情况。我的 pubspec.yaml 依赖项是:

dependencies:

  firebase_core: ^0.4.0+6

  firebase_auth: ^0.11.1+10

  firebase_database: ^3.0.4

  http: ^0.12.0+2

  google_sign_in: ^4.0.4

  provider: ^3.0.0+1

  flutter_geofire: ^0.0.4

  google_maps_flutter: ^0.5.19+2

  location: ^2.3.5
Run Code Online (Sandbox Code Playgroud)

小智 0

这也许解决了你的问题:

转到 ios/ 文件夹运行:

pod outdated
pod update
Run Code Online (Sandbox Code Playgroud)