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

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

    Change the build setting to legacy

    1. First, open your project in XCode by double-clicking on ios/<YourApp.xcodeproj>

    2. Then go to File > Project Settings...

    3. Change the Build System to Legacy Build System in Per-User Project Settings:

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

    For me this worked:

    Click the app name under TARGETS

    Build Settings -> Packaging -> Info.plist File
    

    There change the file location of the Info.plist File to the new location.

    DemoApp/Info.plist to DemoApp/Assets/Info.plist
    

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

    Moving the folders around the inspector can cause the error "Build input file cannot be found"

    SWIFT 5

    In Swift 5, the error came up but the identity showed no errors.

    • Go under build settings and select packaging.
    • Delete the current paths for Debug and Release and enter your new path where the info.plist is kept.

    For example [APPROJECTNAME]/[THEINFOPLISTFOLDER]/info.plist In the screenshot below, the path is API-client/Resources/info.plist

    SWIFT 4

    To fix it, go to the general tab and under identity reselect the info.plist that you like

    I hope this helps

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

    I just had to open the project in finder and drag/drop the appropriate files in the project folder

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

    Build input file cannot be found

    How To fix This issue :

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

    2. Select Build Phases tab

    3. In Compile Sources section, check for the file(s) that Xcode is demanding 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

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

    I got this issue after resolving the conflicts in project.pbxproj.

    Step 1: Removing the "Build input files cannot be found" files from BuildPhases -> Copy Bundle resources and adding them back worked for me.

    If the above Step 1 doesn't work, search for "Recovered References" folder in your project structure and remove the files that are causing this issue and repeat Step 1.

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