我正面临上述问题。我检查了提及路径,发现它不是一个目录,它是一个有效的可执行路径,但仍然面临同样的问题。
详情如下:
Executable Path is a Directory
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/apple/Library/Developer/Xcode/DerivedData/project name-hjamepccgssuuxegmglcegpnsvkp/Build/Products/Debug-iphoneos/projectname.app is not a valid path to an executable file.
User Info: {
DVTErrorCreationDateKey = "2023-06-12 12:59:16 +0000";
}
--````
我通过将 x86_64 添加到 VALID_ARCHS 来修复它。构建设置搜索“VALID_ARCHS”,检查 x86_64 是否存在,添加并运行。它对我有用