Problems after upgrading to Xcode 10: Build input file cannot be found

前端 未结 28 1963

I upgraded my Xcode SDK to version 10 last night and then find I cannot build.

I\'m getting this error:

Build input file cannot be found: \

相关标签:
28条回答
  • 2020-11-28 05:02

    For me In Xcode 10, This solutions worked like a charm. Just go to the Recovered References folder and remove all files in red color and add it again with proper reference.

    0 讨论(0)
  • 2020-11-28 05:03

    I fixed this issue this way: go to your project's Build Phases (click on project icon at the top, and then click on Build Phases). Search for your file there. If it's there (it'll be grayed out), delete it. Then clean (shift + alt + command + k), and run! Hope it helps.

    0 讨论(0)
  • 2020-11-28 05:06

    For Swift files or files that belong to the project such as:

    Build input file cannot be found: PATH/TO/FILE/FILE.swift

    This issue can happen when files or folders have been removed or moved in the project.

    To fix it:

    1. Go in the project-navigator, select your project

    2. Select Build Phasestab

    3. In Compile Sources section, check for the file(s) that Xcode is complaining of

    4. Notice that the file(s) have the wrong path, and delete them by clicking on the minus icon

    5. Re-add the file(s) by clicking the plus icon and search in the project.

    6. Product > Clean Build Folder

    7. Build

    You generally find these missing files in the Recovered References folder of Xcode in the project tree (look for the search bar at the bottom-left of Xcode and search for your complaining file):

    Deleting them from this folder can also solve the error.

    0 讨论(0)
  • 2020-11-28 05:06

    Funnily, closing Xcode and reopening it might also be enough.

    0 讨论(0)
  • 2020-11-28 05:06

    If the error says it can't find Info.plist and it's looking in the wrong path, do the following:

    1. Select your project from the navigator, then select your target
    2. Select "Build Settings" and search "plist"
    3. There should be an option called Info.plist File. Change the location to the correct one.
    0 讨论(0)
  • 2020-11-28 05:06

    What Xcode was complaining about was a XIB file I got it working by going to Project -> Build Phases -> Copy Bundle Resources, removing the "problematic" XIB, cleaning (CMD+Shift+K), building and adding it back again.

    0 讨论(0)
提交回复
热议问题