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

前端 未结 28 1961

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:44

    open the right navigation pane where your project files exist OR JSUT click on cmd + 1 Then search for "Recovered References" Folder open it all red files (delete them) then everything will work so fine .

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

    There is also one possibility that sometimes when you move your files to different folder and especially when you move your info.plist to other folder, you need to define the location of that file. To solve this problem, simply click on your project blue icon on the top, and you will see a button in place of project name and bundle id, click on it and locate the info.plist file there, clean and compile happily.

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

    The above solution eventually works for me; however, I need to do some more extra steps to finally make it to compile successfully. (These extra steps were required even on Xcode 9.)

    1. Xcode: File -> Workspace Settings -> Build System: Legacy Build System
    2. Xcode: Product -> Clean
    3. Rotate to compile thru different emulator types, such as "iPhone 8", "iPhone 8 Plus", etc. (They might fail or might not.)
    4. Eventually compile on "Generic iOS Device"
    0 讨论(0)
  • 2020-11-28 04:47

    I had this happen for building my unit tests. This may have happened because I deleted the example tests.

    I removed the Unit test bundle then re-added it as shown in the pictures below and all was well again.

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

    Not that I did anything wrong, but I ran into this issue for a completely different reason and kinda know what caused this.

    I previously used finder and dragged a file into my project's directory/folder. I didn't drag into Xcode. To make Xcode include that file into the project, I had to drag it into Xcode myself later again.

    But when I switched to a new branch which didn't have that file (nor it needed to), Xcode was giving me this error:

    Build input file cannot be found: '/Users/honey/Documents/xp/xpios/powerup/Models Extensions/CGSize+Extension.swift'


    I did clean build folder and delete my derived data, but it didn't work until I restarted my Xcode.

    0 讨论(0)
  • 2020-11-28 04:47
    1. Go to Xcode-> File -> Project Setting
    2. Change Build System:-"Legacy Build System".
    3. Clean,Build and hit Run.
    0 讨论(0)
提交回复
热议问题