fatal error: malformed or corrupted AST file - Xcode

后端 未结 20 1630
一向
一向 2020-12-02 14:57

I get this error when building my app in the latest version of Xcode:

fatal error: malformed or corrupted AST file: \'Unable to load module \"/Users

相关标签:
20条回答
  • 2020-12-02 15:23

    If you have your project scheme set to "Wait for executable to be launched" this error might happen.

    In that case, just changed your scheme from Product > Scheme > Edit Scheme...

    0 讨论(0)
  • 2020-12-02 15:24

    In my case I had a spaces in my plist file name.

    I removed it, and changed Info.plist File key in target Build Settings

    0 讨论(0)
  • 2020-12-02 15:24

    Cleaning the project and deleting the drive data didn't fix it for me. But what finally fixed it was changing the model of simulator that I used.

    So first do a clean, then if you were running it on iPhone 5 simulator, run it on iPhone 5s simulator to fix the issue. basically, run it on any other simulator other than the one you were running.

    (Credit to Hlung for his answer, I hope this one is a bit more clear)

    0 讨论(0)
  • 2020-12-02 15:25

    In my case, I accidentally modified NSURLConnection.h. Xcode complained about cache at path

    /var/folders/p6/fk2rmf017sn2d_gds6dtqr6hrst8b2/C/com.apple.DeveloperTools/5.0.2-5A3005/Xcode/5.0.2-5A3005/Xcode/ModuleCache/XWWWZ5ED888F

    I finally found the steps to fix it:

    1. Quit Xcode
    2. Delete the upper "5.0.2-5A3005" at /var/folders/p6/fk2rmf017sn2d_gds6dtqr6hrst8b2/C/com.apple.DeveloperTools/5.0.2-5A3005

    When Xcode restarted, it regenerated that folder and everything in it.

    0 讨论(0)
  • 2020-12-02 15:25

    if you can't find your "Derived data"

    1. File -> Workspace settings
    2. Click on the arrow icon next to your path
    3. Remove "Derived data" folder
    0 讨论(0)
  • 2020-12-02 15:26

    I had the same issue ever since installing the latest SDK.

    My solution was to delete the derived data and clean the project.

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