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

前端 未结 26 2141
忘掉有多难
忘掉有多难 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:46

    When I checked out the code first time from the Git I faced the same issue for few pod file. Updating the pod file solved my issue.

    1. Open the project folder in the terminal window
    2. Run 'pod update'
    3. Clean the XCode and run.
    0 讨论(0)
  • 2021-01-30 10:47

    I got this error when I moved my Info.plist into a folder.

    When I took Info.plist out of the folder, I no longer got an error.

    0 讨论(0)
  • 2021-01-30 10:49

    Select general tab and under identity select the info.plist you want for your development

    0 讨论(0)
  • 2021-01-30 10:49

    In some cases, if you Refactor your existing ViewController files or any other files using right-click -> Refactor option within the Xcode workspace then on compiling this error will come since the File name is not changed in original place but reference is updated, so in that you need to also manually change the old file to new name.

    0 讨论(0)
  • 2021-01-30 10:49

    I also faced same issue while building my xcode project - "Build input file cannot be found:" Cause: I renamed my entire project but not the build setting. Solution: In my project's build setting--> Packaging, I updated the path of the info.plist file. Now working fine.

    0 讨论(0)
  • 2021-01-30 10:50

    I had the same problem with a missing view controller file that couldn't be found after cloning a project in a new folder. I deleted the view controller but the compiler continue asking for a file in a path that doesn't exist anymore.

    I solved the problem as follows:

    • Select the project target in the Project-navigator,
    • Go to Build Phases tab
    • In Compile Sources section, check for the file that the compiler is asking for. You can filter by the name at the top right of the screen.
    • The deleted file is still on the list with a wrong path, delete it by clicking on the minus icon. You have to do it for all the target you may have.
    • In the case that you still use the file, add it on a new path by clicking the plus icon.
    • Clean Build Folder in the Product Menu.

    It should work now :D

    (Objective-C Project / Xcode Version 10.2.1 (10E1001))

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