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

前端 未结 28 1965

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 04:55

    If you tried profiling, and then it didn't work, and now you cannot build, go into your Target pane (via the Project Icon), Switch to the Build Settings tab, search for PROFILE - and set CLANG_USE_OPTIMIZATION_PROFILE to "No".

    0 讨论(0)
  • 2020-11-28 04:56

    In my case I accidentally deleted one third-party xcodeproj folder I used in my app.

    0 讨论(0)
  • 2020-11-28 04:57

    This worked for me

    1. try deleting the red colored files
    2. delete the files in derived data
    3. clean the build folder
    4. then try building by using "new build system" from file->workspace settings
    0 讨论(0)
  • 2020-11-28 04:57

    In my case I had a build script that generated the .app binary (Buck). The Buck build script ran in parallel with Swift Embed build step. Because the .app binary was not generated yet the Swift step would fail.

    In my build script I added "$BUILD_PRODUCTS_DIR/$EXECUTABLE_PATH" under "Output Files".

    This tells Xcode's New Build System that this script will output the app Binary and in turn Xcode will make sure to synchronize any build steps that depend on this artifact.

    0 讨论(0)
  • 2020-11-28 04:58

    I ran into this error after renaming a file. Somehow Xcode didn't correctly rename the actual file on disk.

    So it wasn't able to find the file. Sometimes the files gets highlights with a red text color. At other times the Swift icon in front of the file was getting a gray overlay.

    The fix was simple.

    • Look into the error and see exactly which file it's unable to find.
    • Select the file that can't be found.
    • Go to the 'File Inspector'. It's on Xcode's right navigation pane.
    • Click on the folder icon.
    • Select the correct file.
    • Clean build and run it again.
    0 讨论(0)
  • 2020-11-28 04:59

    The "Legacy Build System" solution didn't work for me. What worked it was:

    1. Clean project and remove "DerivedData".
    2. Remove input files not found from project (only references, don't delete files).
    3. Build (=> will generate errors related to missing files).
    4. Add files again to project.
    5. Build (=> should SUCCEED).
    0 讨论(0)
提交回复
热议问题