Xcode不会构建到设备

时间:2022-10-21 20:53:45

This problem has been KILLING me. I've been working on this app for 8 Months, and I am so close to finishing, I just can't seem to build for device. Building for the simulator works fine, but device always gives me the SAME 2 errors.

这个问题一直在杀我。我已经在这个应用程序上工作了8个月,而且我已经接近完成了,我似乎无法构建设备。为模拟器构建工作正常,但设备总是给我SAME 2错误。

The 1st Error: Xcode不会构建到设备"Instruction requires a CPU feature not currently enabled" From googling, I've found this probably means I'm not linking a binary I should be, but I'm not sure.

第一个错误:“指令需要当前未启用的CPU功能”从谷歌搜索,我发现这可能意味着我没有链接我应该的二进制文件,但我不确定。

The 2nd Error: Xcode不会构建到设备

第二个错误:

If you can't read it, it says: Generating JWFNS.app.dSYM ... error: unable to open executable '/Users/ajr1188/Library/Developer/Xcode/DerivedData/JWFNS-azshgysfabycfagnebotitpcyaww/Build/Products/Debug-iphoneos/JWFNS.app/JWFNS'

如果您无法阅读它,它会说:生成JWFNS.app.dSYM ...错误:无法打开可执行文件'/ Users / ajr1188 / Library / Developer / Xcode / DerivedData / JWFNS-azshgysfabycfagnebotitpcyaww / Build / Products / Debug-的iPhoneOS / JWFNS.app / JWFNS”

This is the big one. I cannot seem to build the .app.dSYM file properly. I went in and deleted the build folder, I looked at EVERY * question I could find and tried changing any random thing mentioned in another question, but all of it is to no avail. I'm so suck right now. AHH. PLEASE. Any help would be so appreciated!

这是最重要的一个。我似乎无法正确构建.app.dSYM文件。我进去并删除了构建文件夹,我查看了每个*问题,我可以找到并尝试更改另一个问题中提到的任何随机的东西,但所有这都无济于事。我现在太傻了。 AHH。请。任何帮助都会非常感激!

5 个解决方案

#1


3  

Maybe your project has become hopelessly corrupted. One thing to try is to start a brand new project and copy/import all your sources/assets into the new project to see if that fixes the problem.

也许你的项目已经无可救药地被破坏了。要尝试的一件事是启动一个全新的项目并将所有源/资产复制/导入到新项目中,看看是否能解决问题。

Another less nuclear (but perhaps more time consuming) approach is to binary search the build. Exclude absolutely everything except main.m and see if that fixes the problem. If it does, include half your sources, and buid again....repeat, trying to narrow in on the problem spot. Maybe a file or group of files has received special build settings that don't belong there.

另一种较少核(但可能更耗时)的方法是二进制搜索构建。绝对排除除main.m之外的所有内容,看看是否能解决问题。如果确实如此,包括你的一半来源,并再次建立....重复,试图缩小问题点。也许一个文件或一组文件已经收到了不属于那里的特殊构建设置。

#2


2  

I've had very similar problems, I cant remember the exact error message but it was very similar. Are you able to make a new project that will run on your device? if so (and I know this sounds bad but it's worth a try) Create a new project and simply copy all the code and resources across and see if it still works. If it doesn't then there is something wrong with you code and you can continue trying to isolate the problem from there. Hope this is helpful.

我有非常类似的问题,我无法记住确切的错误信息,但它非常相似。您是否能够制作一个可在您的设备上运行的新项目?如果是这样(我知道这听起来很糟糕,但值得一试)创建一个新项目,只需复制所有代码和资源,看看它是否仍然有效。如果没有,则代码出现问题,您可以继续尝试将问题从那里隔离出来。希望这有用。

#3


2  

check the frameworks you link to. there's a chance that you linked a framework (say quartz) of osx, instead of ios.

检查链接到的框架。你有可能链接osx的框架(比如石英),而不是ios。

#4


0  

Answering in detail is probably going to take looking at your target settings. But it looks like you may be building for the wrong architecture. (It doesn't link, so there is no .dSYM symbol file.) For example, if you have only recently built for device, you probably created your project under an older Xcode, and it may not have the arm6/arm7 settings right.

详细回答可能需要查看您的目标设置。但看起来你可能正在构建错误的架构。 (它没有链接,所以没有.dSYM符号文件。)例如,如果你最近刚刚为设备构建,你可能在较旧的Xcode下创建了你的项目,它可能没有正确的arm6 / arm7设置。

To check, show the Build Settings for your target (not the project), and filter on Architecture.

要检查,请显示目标(而不是项目)的构建设置,并过滤体系结构。

#5


0  

Make sure that in build settings the architectures are armv6 and armv7. Also make sure that in .plist file, the "Application requires iPhone environment" is TRUE. Delete "Required device capabilities" in the .plist if present.

确保在构建设置中架构是armv6和armv7。还要确保在.plist文件中,“应用程序需要iPhone环境”为TRUE。删除.plist中的“必需的设备功能”(如果存在)。

#1


3  

Maybe your project has become hopelessly corrupted. One thing to try is to start a brand new project and copy/import all your sources/assets into the new project to see if that fixes the problem.

也许你的项目已经无可救药地被破坏了。要尝试的一件事是启动一个全新的项目并将所有源/资产复制/导入到新项目中,看看是否能解决问题。

Another less nuclear (but perhaps more time consuming) approach is to binary search the build. Exclude absolutely everything except main.m and see if that fixes the problem. If it does, include half your sources, and buid again....repeat, trying to narrow in on the problem spot. Maybe a file or group of files has received special build settings that don't belong there.

另一种较少核(但可能更耗时)的方法是二进制搜索构建。绝对排除除main.m之外的所有内容,看看是否能解决问题。如果确实如此,包括你的一半来源,并再次建立....重复,试图缩小问题点。也许一个文件或一组文件已经收到了不属于那里的特殊构建设置。

#2


2  

I've had very similar problems, I cant remember the exact error message but it was very similar. Are you able to make a new project that will run on your device? if so (and I know this sounds bad but it's worth a try) Create a new project and simply copy all the code and resources across and see if it still works. If it doesn't then there is something wrong with you code and you can continue trying to isolate the problem from there. Hope this is helpful.

我有非常类似的问题,我无法记住确切的错误信息,但它非常相似。您是否能够制作一个可在您的设备上运行的新项目?如果是这样(我知道这听起来很糟糕,但值得一试)创建一个新项目,只需复制所有代码和资源,看看它是否仍然有效。如果没有,则代码出现问题,您可以继续尝试将问题从那里隔离出来。希望这有用。

#3


2  

check the frameworks you link to. there's a chance that you linked a framework (say quartz) of osx, instead of ios.

检查链接到的框架。你有可能链接osx的框架(比如石英),而不是ios。

#4


0  

Answering in detail is probably going to take looking at your target settings. But it looks like you may be building for the wrong architecture. (It doesn't link, so there is no .dSYM symbol file.) For example, if you have only recently built for device, you probably created your project under an older Xcode, and it may not have the arm6/arm7 settings right.

详细回答可能需要查看您的目标设置。但看起来你可能正在构建错误的架构。 (它没有链接,所以没有.dSYM符号文件。)例如,如果你最近刚刚为设备构建,你可能在较旧的Xcode下创建了你的项目,它可能没有正确的arm6 / arm7设置。

To check, show the Build Settings for your target (not the project), and filter on Architecture.

要检查,请显示目标(而不是项目)的构建设置,并过滤体系结构。

#5


0  

Make sure that in build settings the architectures are armv6 and armv7. Also make sure that in .plist file, the "Application requires iPhone environment" is TRUE. Delete "Required device capabilities" in the .plist if present.

确保在构建设置中架构是armv6和armv7。还要确保在.plist文件中,“应用程序需要iPhone环境”为TRUE。删除.plist中的“必需的设备功能”(如果存在)。