在 Xcode 7.2 中加载文件时出错并崩溃 [英] ERROR LOADING FILES IN XCODE 7.2 AND CRASHING

查看:25
本文介绍了在 Xcode 7.2 中加载文件时出错并崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始开发我的应用程序的新版本.我打开项目并在模拟器上运行游戏,但在调试控制台中不断出现错误.无法加载声音文件example.wav""和图像一样.

I just started working on a new version of my app. I opened the project and ran the game on the simulator and got constant errors in the debug console. "sound file could not be loaded "example.wav"" and the same with images.

  • 我什么都没做,但是我相信我在开始之前得到了 XCode 更新.(至 7.2 版)
  • 在每个模拟器和设备上进行了数天的测试后,我也遇到了同样的问题.它列出的图像和声音不会显示/播放,而是显示为白色方块.
  • 加载错误的图像/声音后(即出现白色方块),如果与之交互或场景发生变化,应用将崩溃.

到底是怎么回事?

推荐答案

我找到了出现这么多错误的原因.首先,其中很多是随机的(无害的)XCode 7.2 错误,但是导致文件崩溃和错误加载的错误是由以下原因引起的:我不小心在更新功能中加载了一个声音文件.我把它移出了那个空白,它开始完美地工作.它一定是反复加载并导致错误.

I figured out the reason I was getting all the many errors. Firstly a lot of them were random (harmless) XCode 7.2 errors, but the errors that were causing the crashing and incorrect loading of files were caused by: I was accidentally loading a sound file in the Update function. I moved this out of that void and it began working perfectly. It must've been loading over and over and causing the error.

这篇关于在 Xcode 7.2 中加载文件时出错并崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆