Xcode: Build Failed, but no error messages

后端 未结 13 1441
[愿得一人]
[愿得一人] 2021-01-30 09:56

Using Xcode 4.5.1. Our project has been building fine for the last three months, but suddenly, when I try to build, it says \"Build failed\", but does not show any errors on the

相关标签:
13条回答
  • 2021-01-30 10:24

    This happened to me while I was writing in Swift 4.1 in XCode 9.3. I use RxSwift also. It never happened while I was writing in Objective C. There were no any logs in Report Navigator too. Project just compiled without errors, then failed. Couldn't figure out why.

    In my case what I did and it helped:

    1. Commit changes in Git and then discard changes in XCode if it shows "M" near files
    2. Clear derived data: Xcode -> Preferences -> location
    3. Clean build folder: Shift + Cmd + Alt + K
    4. Restart XCode

    After this project tried to compile and showed errors. The error was here:

    do {
        let jsonData = try JSONSerialization.data(withJSONObject: timingsDict, options: .prettyPrinted)
        let decoder = JSONDecoder()
        let pTiming = try decoder.decode(PTiming.self, from: jsonData)
        observer.onNext(timing)
        observer.onCompleted()
    } catch {
        print(error.localizedDescription)
        observer.onError(error)
    }
    

    I passed wrong variable name in observer.onNext(timing). It should have been pTiming.

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

    Other answers helped me find the Report Navigator. The only error displayed was:

    Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons. One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem.

    I fixed this by closing the Simulator.

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

    Figured it out. On the tab with three lines in a speech bubble, it shows a build log. I guess my storyboard file had become corrupt during the last git pull.

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

    You can see reasons for failure on Report Navigator present in Navigator window.

    • Open Navigator by pressing Hide/Show Navigator button present in top-left side of Xcode.

    • Open Report Navigator by pressing last button present on list of buttons in Navigator window.

    Here you can view reasons either By Group or By Time

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

    There might be no free disk space left.

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

    With me it was the dev provisioning profile I was using for that scheme. I changed it to release and it worked

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