关于建筑的问题
我用的是M1Mac机。我试图在我的设备上运行我的应用程序。但不知何故,出现了一条错误消息,上面写着“无法找到构建输入文件”。
详细信息:
CopySwiftLibs /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app (in target 'finwork' from project 'finwork')
cd /Users/evanlu/Desktop/rebackup/finwork
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk
builtin-swiftStdLibTool --copy --verbose --sign 22FE53F897AFEB6A2955A6C7BCB17C806EDD894A --scan-executable /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/Frameworks --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/PlugIns --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/Pods_finwork.framework --platform iphoneos --toolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --destination /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/Frameworks --strip-bitcode --strip-bitcode-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip --emit-dependency-info /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Intermediates.noindex/finwork.build/Debug-iphoneos/finwork.build/SwiftStdLibToolInputDependencies.dep --filter-for-swift-os
error: Build input file cannot be found: '/Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork' (in target 'finwork' from project 'finwork')
当我使用模拟器时。它找不到我的Pod插件。
/Users/evanlu/Desktop/rebackup/finwork/finwork/Database/FirestoreDatabase.swift:9:8: No such module 'FirebaseCore'
这就是我尝试过的方法。
1.清除Build文件夹。
2.重新安装和更新播客文件。
3.选中编译源代码确保没有红色或灰色的文件。
4.检查我没有使用遗留构建系统。
5.追踪小路
(/Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork).
它说“finwork.app已损坏,无法打开”,我检查了里面的BREW,里面没有finwork文件。
6.我尝试将构建设置更改为EXCLUDED_ARCHS = arm64 ,ONLY_ACTIVE_ARCH:YES
它仍然不可行。
这是我的播客文件:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'finwork' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
#use_modular_headers!
#use_frameworks! :linkage => :static
pod 'GoogleMaps'
pod 'SwiftyStarRatingView'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
#pod 'FirebaseUI'
#pod 'FirebaseUI', '>= 10.0.2'
#pod 'GoogleSignIn'
pod 'Firebase/Database'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
#pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
#pod 'gRPC-Core', '= 1.21.0', :modular_headers => false
pod 'SideMenu'
#pod 'FBSDKLoginKit'
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
补充:
模拟器在一开始是工作的,但设备不是。
当我在iPhone上运行时,它会显示Command PhaseScriptExecution failed with a nonzero exit code
。
所以我更改了我的构建设置,包括设置EXCLUDED_ARCHS = arm64
、删除VALID_ARCHS
、尝试将ONLY_ACTIVE_ARCH
设置为YES和NO(两者都不起作用)。然后返回No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=( arm64 )).
,之后我保留构建设置ONLY_ACTIVE_ARCH = NO
、EXCLUDED_ARCHS = arm64
并清除构建文件夹+重新安装podfile。它开始说Library not loaded: @rpath/FBLPromises.framework/FBLPromises
。为了解决这个问题,我更改了开发人员帐户。然后它把我推到了这个位置。
生成设置:
任何建议都将是有帮助的,或者告诉我我是如何毁了我的项目的。感谢您的宝贵时间!
更新:我只是清理了几次构建文件夹,现在用模拟器运行,它也显示了Build input file cannot be found
。但奇怪的是,我没有做任何事情来解决No such module 'FirebaseCore'
3条答案
按热度按时间mzaanser1#
是否要尝试与下图相同的方法?
Build Settings
->Architectures
->Excluded Architectures
、arm64
。我不知道这是否会有帮助,但我希望它能得到解决。
yws3nbqq2#
如果您正在存档,而其他任何东西对您都不起作用:
确保删除
Build Settings
->Architectures
->Release
下的arm64xu3bshqb3#
我遇到了同样的问题,并通过以下方式解决了它:
构建阶段>构建前>
以及添加输出文件(为您输入?)。