0

即使使用 Xcode 13.2.1,我的颤振应用程序也运行良好。在对代码进行了一些更改后,我尝试使用 iOS 构建它。它正在建设中。但是,当我尝试为 Testflight 存档项目时,我遇到了以下错误。

多个命令产生'/Users/mdhasanrahman/Library/Developer/Xcode/DerivedData/Runner-fgzktmibyndpbgfkmsizqhgncvxe/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Reachability.framework':

  1. 目标“可达性”具有创建目录命令,输出为“/Users/mdhasanrahman/Library/Developer/Xcode/DerivedData/Runner-fgzktmibyndpbgfkmsizqhgncvxe/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Reachability.framework”
  2. 目标“ReachabilitySwift”具有创建目录命令,输出为“/Users/mdhasanrahman/Library/Developer/Xcode/DerivedData/Runner-fgzktmibyndpbgfkmsizqhgncvxe/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Reachability.framework”

还有一个目标完整性问题。

多个目标与链接器标志“-framework Reachability”的隐式依赖相匹配。考虑添加对预期目标的显式依赖以解决这种歧义。(在项目“Runner”的目标“Runner”中)

目标“可达性”(在项目“Pods”中)

目标“ReachabilitySwift”(在项目“Pods”中)

在过去的 4 天里,我已经尝试了所有我能找到的解决方案。仍然没有运气。我目前正在使用带有 M1 Max 处理器的 Flutter(通道主机,2.11.0-0.0.pre.450,在 macOS 12.1 上)。以下是 Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

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

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

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

4

1 回答 1

0

您在文件中添加了多个连接插件pubspec.yaml。请删除所有其他插件并仅放置一个。

于 2022-02-11T14:12:23.313 回答