Xcode不在模拟器上运行应用程序。(应用程序意外退出)

时间:2022-10-27 22:48:14

I'm developing for iPad (iOS 7), using Xcode 5.0.2. Yesterday morning I was playing around with the app (my first app) and every time I ran it, it was displayed in the emulator perfectly. But after some 5/6 runs Xcode just stopped launching my app in the simulator. I started to receive this message:

我正在为iPad (ios7)开发,使用Xcode 5.0.2。昨天早上我在玩这个应用(我的第一个应用),每次我运行它,它都完美地显示在模拟器中。但是在5/6运行Xcode后,我的应用程序就停止在模拟器中运行了。我开始收到这样的信息:

MagazineManager exited unexpectedly - lost connection

杂志制作人出乎意料地退出了——失去了联系

Image:

图片:

Xcode不在模拟器上运行应用程序。(应用程序意外退出)

I've been researching since yesterday morning for a solution with no luck. I even uninstalled and reinstalled Xcode, cleared the cache, delete folders... all that drama thinking it could be some sort of cache problem.

从昨天早上开始,我就一直在研究一个毫无希望的解决方案。我甚至卸载和重新安装Xcode,清除缓存,删除文件夹…所有的戏剧性想法都可能是某种缓存问题。

Then, going online I've tried lots of "solutions", none worked.

然后,在网上我尝试了很多“解决方案”,都没有成功。

I've tried all listed here: Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."

我试过了这里列出的所有东西:Xcode突然停止在硬件上运行项目:“无法启动xxx。”应用:. .没有这样的文件…”

and here:https://discussions.apple.com/message/23431537#23431537

这里:https://discussions.apple.com/message/23431537 # 23431537

and in more places.

在更多的地方。

After all my "try this, try that" I'm stuck with the same problem. I can only see a black screen at the simulator (image below) and that message at Xcode!

在我“试试这个,试试那个”之后,我又陷入了同样的问题。我只能在模拟器上看到黑屏(下图),在Xcode上看到那条消息!

Xcode不在模拟器上运行应用程序。(应用程序意外退出)

In my extensive research I've read that people are still able to debug using their iPad's. The problem is that I got the new iPad air, that's only getting here dec, 20th!! So I don't have a place to test my app[s].

在我的广泛研究中,我读到人们仍然能够使用iPad进行调试。问题是,我买了新的iPad air,这才到12月20日!所以我没有地方去测试我的应用。

Thanks!

谢谢!

UPDATE

更新

Just got this message in the debugger console:

刚刚在调试器控制台收到这条消息:

013-12-09 20:23:25.902 sim[607:303] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin/sim: Did not find an executable file at the path: '/Users//Library/Developer/Xcode/DerivedData/MagMan-bvhhiijesvrvuteunbmpsxcqgsst/Build/Products/Debug-iphonesimulator/MagMan.app'

013-12-09 20:23:25.902 sim(607:303)/应用程序/ xcode /内容/开发/平台/ iPhoneSimulator。平台/usr/bin/sim:在路径:'/ user /Library/Developer/Xcode/ Xcode/DerivedData/ magman - bhhiijesijesvvvrvvvvvvsxcqgsst /Build/Products/Debug-iphonesimulator/MagMan.app'

3 个解决方案

#1


5  

My problem was the debugger. Actually, it still is. The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.

我的问题是调试器。实际上,它仍然是。我为每个新项目解决的方法是禁用调试器,然后运行项目。这样,我就可以在模拟器上使用这个应用程序,但没有调试功能。

I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.

我不知道问题是什么,在我的例子中是什么导致了调试器问题,但是现在这是我能想到的最好的了。感谢朋友们回答了我的问题并帮助我做了研究,我能够测试并禁用它。

This is how I disabled the debugger:

我就是这样禁用调试器的:

  1. Project > Edit scheme
  2. 项目>编辑计划
  3. Set Debugger to None
  4. 设置调试器没有

Xcode不在模拟器上运行应用程序。(应用程序意外退出)

If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.

如果有人知道这个问题的解决方案,请随意回答这个问题,我将确保相应地更新所选的答案。

Again, thanks for all your time and patience, specially @Popeye and @HotLicks that spent a lot of their time trying to help me.

再次感谢大家的耐心和耐心,尤其是大力水手和热心人士,他们花了很多时间来帮助我。

#2


4  

Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:

有时候模拟器会有点脆弱,需要重新设置。在屏幕顶部的导航栏中,当模拟器可见时,请尝试:

iOS Simulator --> Reset Content and Settings...

This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.

这将重置所有的设置并删除内容,这样所有的数据、图像、应用程序等都将被删除,就像以前从未运行过一样。

UPDATE

更新

The answer on XCode5 can't install app on iOS simulator indicates the following

XCode5上的答案是无法在iOS模拟器上安装app

I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy

我找到了一个解决办法。在尝试了所有东西并在“我的应用”上得到相同的错误之后,我打开并尝试运行“我的应用2”。“我的应用2”运行得很好,所以我回到“我的应用”,再次尝试,这次一切都很好。疯狂的

If that doesn't work leave a comment and I will have another look.

如果不奏效的话,请留下评论,我会再看一遍。

#3


-1  

Delete the app and restart your iPad it will work

删除这个应用程序,重启你的iPad,它就会起作用。

#1


5  

My problem was the debugger. Actually, it still is. The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.

我的问题是调试器。实际上,它仍然是。我为每个新项目解决的方法是禁用调试器,然后运行项目。这样,我就可以在模拟器上使用这个应用程序,但没有调试功能。

I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.

我不知道问题是什么,在我的例子中是什么导致了调试器问题,但是现在这是我能想到的最好的了。感谢朋友们回答了我的问题并帮助我做了研究,我能够测试并禁用它。

This is how I disabled the debugger:

我就是这样禁用调试器的:

  1. Project > Edit scheme
  2. 项目>编辑计划
  3. Set Debugger to None
  4. 设置调试器没有

Xcode不在模拟器上运行应用程序。(应用程序意外退出)

If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.

如果有人知道这个问题的解决方案,请随意回答这个问题,我将确保相应地更新所选的答案。

Again, thanks for all your time and patience, specially @Popeye and @HotLicks that spent a lot of their time trying to help me.

再次感谢大家的耐心和耐心,尤其是大力水手和热心人士,他们花了很多时间来帮助我。

#2


4  

Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:

有时候模拟器会有点脆弱,需要重新设置。在屏幕顶部的导航栏中,当模拟器可见时,请尝试:

iOS Simulator --> Reset Content and Settings...

This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.

这将重置所有的设置并删除内容,这样所有的数据、图像、应用程序等都将被删除,就像以前从未运行过一样。

UPDATE

更新

The answer on XCode5 can't install app on iOS simulator indicates the following

XCode5上的答案是无法在iOS模拟器上安装app

I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy

我找到了一个解决办法。在尝试了所有东西并在“我的应用”上得到相同的错误之后,我打开并尝试运行“我的应用2”。“我的应用2”运行得很好,所以我回到“我的应用”,再次尝试,这次一切都很好。疯狂的

If that doesn't work leave a comment and I will have another look.

如果不奏效的话,请留下评论,我会再看一遍。

#3


-1  

Delete the app and restart your iPad it will work

删除这个应用程序,重启你的iPad,它就会起作用。