'Build input file cannot be found' Swift 4.2, Xcode 10.0

前端 未结 26 2176
忘掉有多难
忘掉有多难 2021-01-30 10:16

I am getting the following error when building in Xcode 10.0 with swift 4.2:

26条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-30 10:35

    I tried going to Compile Sources in the Build Phases tab and deleting and re-adding the selected file (and cleaning and rebuilding)but it didn't work :( Instead, this following answer worked for me if you get the 'Build input file cannot be found' error message:

    1. Delete the affected files in Xcode (I right-clicked->Delete'd in the Navigator)
    2. Re-add the affected file (mine was .mlmodel) and I selected "Copy items if needed" under Destination.
    3. Cmd-shift-k to clean and then Cmd-b to build and voila! The file was recognized and error gone!

    Hope this helps!

提交回复
热议问题