ios - 多个命令产生颤动 GoogleUtilities
问题描述
我正在尝试为应用商店构建。使用命令flutter build ipa
并低于错误。虽然构建工作(当我从 Android 工作室运行时)在调试模式下,但我可以收到推送通知。
warning: Multiple targets match implicit dependency for linker flags '-framework GoogleUtilities'. Consider adding an explicit dependency on the intended target to
resolve this ambiguity. (in target 'Runner' from project 'Runner')
warning: Multiple targets match implicit dependency for linker flags '-framework GoogleUtilities'.Consider adding an explicit dependency on the intended target to
resolve this ambiguity. (in target 'ImageNotification' from project 'Runner')
error: Multiple commands produce
'/Users/manu/Library/Developer/Xcode/DerivedData/Runner-csuwafuzvneucvdjlkobmosdwxae/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuild
FilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework':
1) Target 'GoogleUtilities-00567490' has create directory command with output
'/Users/manu/Library/Developer/Xcode/DerivedData/Runner-csuwafuzvneucvdjlkobmosdwxae/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuild
FilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
2) Target 'GoogleUtilities-54e75ca4' has create directory command with output
'/Users/manu/Library/Developer/Xcode/DerivedData/Runner-csuwafuzvneucvdjlkobmosdwxae/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuild
FilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
我ImageNotification
在推送通知中为推送图像添加了一个新的目标通知服务扩展
这是我的 pod 文件:
# Uncomment this line to define a global platform for your project
platform :ios, '14.3'
# 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
target 'ImageNotification' do
use_frameworks!
pod 'Firebase/Messaging'
end
解决方案
添加 - pod 'GoogleUtilities' 到 PodFile 中的 ImageNotification 目标和 Runner 目标。
target 'ImageNotification' do
...
pod 'GoogleUtilities'
end
target 'Runner' do
...
pod 'GoogleUtilities'
end
然后删除 PodFile.lock 然后运行flutter clean,然后flutter pub get,然后flutter build ios。之后在 Xcode 中打开 ios 模块并构建存档。它会起作用的。
推荐阅读
- python - 如何在没有多余换行符的情况下从 BeautifulSoup 输出 XML?
- c# - Emgu CV ArucoInvoke.InterpolateCornersCharuco 给出错误“Emgu.CV.Util.CvException: 'OpenCV: 0 <= i && i < (int)vv.size()'”
- angular - 使用 mat-menu 作为上下文菜单:如何关闭打开的 mat-menu,并在另一个位置打开它
- snowflake-cloud-data-platform - 有人有基于 Snowflake Infoschema 系统表的数据字典吗?
- javascript - 选择相应表列应隐藏的特定值的复选框
- c# - C# Excel 互操作按行/列复制单元格 - 没有错误,但不复制
- regex - 寻找 ruby 正则表达式来匹配字符串中可能有不同顺序的多个单词
- python - 在 Pandas Dataframe 中过滤不同的列
- java - Intent 中的网格视图位置没有增加
- java - 控制器不接受我的请求。它总是显示 404 not found