xcode 编译时“设备上没有剩余空间”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31029255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:22:00  来源:igfitidea点击:

"No space left on device" error when compiling

iosiphonexcode

提问by user3115233

In Xcode, when I tried to run my app on my device (iPhone), I get "no space left on device". The app was working on iPhone yesterday, but today I got this error.

在 Xcode 中,当我尝试在我的设备 (iPhone) 上运行我的应用程序时,我得到“设备上没有剩余空间”。该应用程序昨天在 iPhone 上运行,但今天我遇到了这个错误。

Anyone know how to fix this problem?

有谁知道如何解决这个问题?

回答by App Dev Guy

There are two common steps to this fairly common issue:

这个相当普遍的问题有两个常见的步骤:

  1. Delete the app from your device.
  2. command+k which will clean your code and run again.

    OR

  3. Close Xcode and reopen, run again.
  1. 从您的设备中删除该应用程序。
  2. command+k 将清理您的代码并再次运行。

    或者

  3. 关闭Xcode并重新打开,再次运行。

Ensure you delete the app from your device first. If necessary, turn your phone off and on again, but I have never had to do this after erasing the app from the device and reinstalling.

确保先从设备中删除该应用程序。如有必要,请关闭并重新打开手机,但在从设备上删除应用程序并重新安装后,我从未这样做过。

回答by lee

Maybe need to check storage on your Mac. I have the same problem with Xcode8.3.2with 2Gb available of SSD on MacBook, after delete somethings then it worked.

也许需要检查 Mac 上的存储空间。我Xcode8.3.2在 MacBook 上有 2Gb 可用的 SSD也有同样的问题,在删除一些东西之后它就可以工作了。

回答by Den Pat

If anyone have issue on Mac or windows emulator and not on actual device than please open the disk on which your project code is and check that disk size and not your primary application disk size, you will need space on that disk too which had your project code, I did this and it just worked fine after that.

如果有人在 Mac 或 Windows 模拟器上而不是在实际设备上遇到问题,请打开项目代码所在的磁盘并检查磁盘大小而不是主应用程序磁盘大小,您也需要在该磁盘上有您的项目的空间代码,我这样做了,在那之后它运行良好。

回答by ThisIsAkshayJain

I encountered this error when building the app in iOS Simulator. I realized that my Mac's storage was full. So, I freed up some space of about 10 GB, and the rebuild was successful.

我在 iOS 模拟器中构建应用程序时遇到了这个错误。我意识到我的 Mac 的存储空间已满。所以,我释放了一些大约 10 GB 的空间,并且重建成功。

回答by Atmaram

Check you hard disk, if its full then delete some unwanted data build and run. It worked for me.

检查您的硬盘,如果已满则删除一些不需要的数据并运行。它对我有用。

回答by Duncan C

I am currently seeing this error message ("No space left on device") when creating named semaphores using sem_open(). (A Unix function call) The error message text is returned by a function called errno(), the result of which I write to the console when sem_open fails.

我目前在使用 sem_open() 创建命名信号量时看到此错误消息(“设备上没有剩余空间”)。(Unix 函数调用)错误消息文本由名为 errno() 的函数返回,当 sem_open 失败时,我将其结果写入控制台。

It sounds to me like some code you are using is attempting to create a semaphore and getting this error. It's my understanding that this happens when you create too many named semaphores without freeing them (They persist between runs of your program.) You will probably solve the problem temporarily by rebooting your phone.

在我看来,您正在使用的某些代码正在尝试创建信号量并出现此错误。我的理解是,当您创建太多命名信号量而没有释放它们时会发生这种情况(它们在程序运行之间持续存在。)您可能会通过重新启动手机来暂时解决问题。

The same message may well be displayed by other system functions, not just sem_open. You might try setting a symbolic breakpoint on errno() and seeing if you can find the code that is generating the error message.

其他系统函数很可能会显示相同的消息,而不仅仅是 sem_open。您可以尝试在 errno() 上设置符号断点,看看是否可以找到生成错误消息的代码。