MrWhetherMan
MrWhetherMan

Reputation: 1334

Xcode- 7: No such file or directory

I keep trying to run my Xcode project (titled "YidKit") and it keeps giving me the following error: error: /Users/Dani/Library/Developer/Xcode/DerivedData/YidKit-exnbjyxkgkbeaedoznkmtoenfijq/Build/Products/Debug-iphoneos/YidKitTests.xctest: No such file or directory. I spent several hours online, trying different solutions that I've seen, and nothing has worked. This is driving me crazy, because it is the only error left and I just finished getting rid of about 80 that were caused by Swift 2.0. I appreciate all of the help I can get!

UPDATE Here is an image of the file in the explorer. The red one is the file that is giving me the error.

File In Explorer

Upvotes: 11

Views: 34277

Answers (10)

theswed
theswed

Reputation: 49

Anyone tried the good old trick rebooting the computer? I tried and everything worked out fine! Give it a try

Upvotes: 0

MiracleDebris
MiracleDebris

Reputation: 1

Just delete the "Derived Data" folder and compile the project again.

Upvotes: 0

stellar lee
stellar lee

Reputation: 63

TARGETS --> Build Phases --> search file --> delete redundant .m

Upvotes: 6

Amr
Amr

Reputation: 2280

The solution which worked with me is as following:

  1. Go in the left panel of the Xcode to products folder then select the Tests.xctest file

  2. In the right panel of Xcode / Target Membership, unselect Tests

  3. Click command u

Upvotes: 0

Kevin Gray
Kevin Gray

Reputation: 913

I had a similar error popping up, and it turned out being the simulator was not being found. So, I deleted all my simulators and and added new ones. This fixed it for me. It's pretty unlikely this will be a fix for you, but I really wish I had seen this response 3 hours ago.

Upvotes: 0

Grambo
Grambo

Reputation: 949

I'm sure you've figured out a workaround by now but for those still running into this problem the error is occurring because Xcode is trying to access a file for your project, but it can no longer find it. In your case the file it can't find is YidKitTests.xctest, so what you can do is click on it in the Project Navigator, then on the right in the File Inspector, click on the little folder icon under Location. When you click on the folder a Finder window will open up and its your job to navigate to where the YidKitTests.xctest file should be and double click on it. More often than not the file is in the exact place Xcode says it isn't, eg. /Users/Dani/Library/Developer/Xcode/DerivedData/YidKit-exnbjyxkgkbeaedoznkmtoenfijq/Build/Products/Debug-iphoneos/YidKitTests.xctest, but for some reason it can't see it without you pointing it out. I hope this helps!

Upvotes: 0

user6240643
user6240643

Reputation: 1

You should try to edit option in folder to show more you looking then you will see some error file inside after you find it delete it! Hope this help.

Upvotes: -1

Ted
Ted

Reputation: 23746

Go to project, target, build phase

  1. remove the files causing problem (click - below)
  2. add the files again (File -> Add Files to Project)
  3. clean then run

Upvotes: 1

Ricardo Alves
Ricardo Alves

Reputation: 652

For future reference

One way you can solve this problem is to open your Project with a text editor and search for the file there. It should be there the file path for it. Just delete it and any references that might exist of the file.

It should be working now.

Don't forget to BACKUP FIRST before doing this

Upvotes: 3

Pravin Tate
Pravin Tate

Reputation: 1130

do following two things I might solve your problem.

  1. Product -> Clean and build folder
  2. Go to finder -> library -> Developer -> Xcode -> Derived data delete that folder

or check screen shot may be this is your problem enter image description here

and then check

Upvotes: 22

Related Questions