error: Unable to resolve build file: XCBCore.Build

2020-02-24 12:20发布

error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference("3bf83096e50de72a94699e9afc1133ebe3512682230d04680075c283a974e273")) (in target 'MyTarget')

Xcode 10 is giving this error immediately when trying to build our project. It's not immediately clear what is causing it.

How can I resolve it?

18条回答
We Are One
2楼-- · 2020-02-24 12:30

For me, XCode > Product > Clean Build Folder and restart Xcode then worked.

查看更多
一夜七次
3楼-- · 2020-02-24 12:30

My solution was that I was using the wrong Xcode version for the project I was working with. It still required 10.1 and I was attempting to run in 10.2. I instead opened it in 10.1 and the error went away while successfully compiling.

查看更多
不美不萌又怎样
4楼-- · 2020-02-24 12:30

Seems like there are a number of reasons for which one runs into the same error. For my case, it was not having the Submodule checked out locally. After I made sure all my Submodules were downloaded, the error went away.

查看更多
做自己的国王
5楼-- · 2020-02-24 12:36

For me there was a different solution after none of the above worked. The problem started after using unlink for one of my packages. Then for some reason, the Package was still there under Libraries, but it was greyed. After deleting the greyed Library, everything started working again.

查看更多
▲ chillily
6楼-- · 2020-02-24 12:38

In my case, after trying all solutions in this question and some more (including updating Xcode 10.2 beta and even macOS), the only thing that worked was accessing the project bundle (right click > Show Package Contents) and remove everything except project.pbxproj:

  • project.xcworkspace
  • xcshareddata
  • xcuserdata
查看更多
7楼-- · 2020-02-24 12:38

In my case, it was a simple issue of a missing file.

Checked all secondary error messages. Error report said that my bridging-header.h file was not being found. Checked the path of the missing file from the target settings (just search for .h to get the right setting key). Fixed the new path and error went away.

The cause: I had reorganized my folders after a system crash and added a second level to my project location.

查看更多
登录 后发表回答