Deleted class drops error message unknown>:0: error: no such file or directory:

﹥>﹥吖頭↗ 提交于 2019-12-03 08:39:56

问题


So me and some friends working on a bitbucket project and already realized that bitbucket sometimes doesn't sync all the files. But here is what happened:

I continued working and created an class, I basically copied an old View Controller (called WelcomescreenViewController.swift -> CreateAccountViewController.swift) and made some adjustments in the main storyboard. Here I deleted all the old outlets in the new one and then made an own class for it as ViewController and connected it with it in the main storyboard.

What now happened is that there were some problems and I reverted everything and deleted both things again. And basically now Xcode still kind of thinks that there should be the class. It always drops the message:

I also made a screenshot from the directory with my files as it is now:

I tried to create the class again, so that Xcode is happy but it doesn't help. Is the file somewhere linked or what shall I do, to teach Xcode hey everything is fine, don't mind about the old file CreateAccountViewController.swift?


回答1:


Make sure in your target settings, under Build Phases > Compile Sources that your file isn't listed there:

Also, just check it somehow hasn't been added to Copy Bundle Resources.




回答2:


If you're developing a pod, and the deleted file is in the pod, try pod install to rebuild the framework.




回答3:


Check if the deleted files are still in Project, if yes, delete. build ...



来源:https://stackoverflow.com/questions/34844782/deleted-class-drops-error-message-unknown0-error-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!