Eva*_* Lu 8 xcode ios swift apple-m1
建筑问题
\n我正在使用 m1 mac 机器。\n我尝试在我的设备上运行我的应用程序。\n但不知何故出现一条错误消息,提示“找不到构建输入文件”。
\n详细的:
\nCopySwiftLibs /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app (in target \'finwork\' from project \'finwork\')\n cd /Users/evanlu/Desktop/rebackup/finwork\n export CODESIGN_ALLOCATE\\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate\n export DEVELOPER_DIR\\=/Applications/Xcode.app/Contents/Developer\n export SDKROOT\\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk\n 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\n\nerror: 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\')\n
Run Code Online (Sandbox Code Playgroud)\n\n当我使用模拟器时。它无法\xe2\x80\x99找到我的pod插件。
\n/Users/evanlu/Desktop/rebackup/finwork/finwork/Database/FirestoreDatabase.swift:9:8: No such module \'FirebaseCore\'\n\n
Run Code Online (Sandbox Code Playgroud)\n这些是我已经尝试过的。
\n1.清除构建文件夹。
\n2.重新安装并更新podfile。
\n3.检查编译源,确保\xe2\x80\x99s中不存在红色或灰色文件。
\n4.检查我没有使用旧版构建系统\xe2\x80\x99t。
\n5.追踪路径
\n\n\n(/Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork)。
\n
它说“finwork.app已损坏,无法打开\xe2\x80\x99”,我检查里面的brew,里面没有finwork文件。
\n6.我尝试将“构建设置”更改为EXCLUDED_ARCHS = arm64 ,ONLY_ACTIVE_ARCH:YES
“它”仍然行不通。
这里\xe2\x80\x99是我的podfile:
\n# Uncomment the next line to define a global platform for your project\n# platform :ios, \'9.0\'\n\ntarget \'finwork\' do\n # Comment the next line if you don\'t want to use dynamic frameworks\n use_frameworks!\n #use_modular_headers!\n #use_frameworks! :linkage => :static\n pod \'GoogleMaps\'\n\n pod \'SwiftyStarRatingView\'\n\n pod \'Firebase/Analytics\'\n pod \'Firebase/Auth\'\n pod \'Firebase/Storage\'\n pod \'FirebaseUI/Storage\'\n #pod \'FirebaseUI\'\n #pod \'FirebaseUI\', \'>= 10.0.2\'\n #pod \'GoogleSignIn\'\n pod \'Firebase/Database\'\n pod \'Firebase/Firestore\'\n pod \'FirebaseFirestoreSwift\'\n\n #pod \'BoringSSL-GRPC\', \'= 0.0.3\', :modular_headers => false\n #pod \'gRPC-Core\', \'= 1.21.0\', :modular_headers => false\n pod \'SideMenu\'\n\n #pod \'FBSDKLoginKit\'\n\n post_install do |installer|\n installer.pods_project.build_configurations.each do |config|\n config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"\n end\n end\nend\n
Run Code Online (Sandbox Code Playgroud)\n补充:
\n模拟器一开始可以工作,但设备不行。
\n当我在 iPhone 上运行时,它会显示Command PhaseScriptExecution failed with a nonzero exit code
。\n\n所以我更改了我的构建设置,包括设置
EXCLUDED_ARCHS = arm64
\n\xe3\x80\x81Deleted VALID_ARCHS
\xe3\x80\x81\n尝试设置ONLY_ACTIVE_ARCH
为是和否(它们都不起作用)。\n然后它返回我No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=( arm64 )).
\n此后我保留我的构建设置ONLY_ACTIVE_ARCH = NO
,EXCLUDED_ARCHS = arm64
然后清除构建文件夹+重新安装 podfile。\n它开始说Library not loaded: @rpath/FBLPromises.framework/FBLPromises
。\n为了解决这个问题,我更改了开发人员帐户。\n然后它把我带到了这个位置。
构建设置:
\n\n任何建议都会有所帮助,或者少告诉我我是如何屠杀我的项目的。\n感谢您花时间\xef\xbc\x81
\n更新:\n我只是清除构建文件夹几次并通过模拟器运行,现在它也显示了我Build input file cannot be found
。\n但奇怪的是,我没有\xe2\x80\x99做任何事情来解决No such module \'FirebaseCore\'
\n
您想尝试与下图相同的方法吗?
Build Settings
-> Architectures
-> Excluded Architectures
, arm64
.
我不知道它是否有帮助,但我希望它能得到解决。
归档时间: |
|
查看次数: |
17255 次 |
最近记录: |