简体   繁体   中英

Xcode 7.0.1 - SDKs not recognized > “iPhoneOSX.X (SDK not found)”

I recently updated Xcode from 7.0 to 7.0.1 and now I'm unable to build with 8.0 as a base SDK. Typically this happens when upgrading and I simply needed to copy the SDKs into the right place.

As you can see, they are already there:

$ ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

iPhoneOS.sdk    iPhoneOS8.0.sdk iPhoneOS8.1.sdk iPhoneOS8.2.sdk iPhoneOS8.4.sdk iPhoneOS9.0.sdk

This is how the target looks: 在此处输入图片说明

My device (named Spock) now only has one entry where before there was an entry for every SDK:

在此处输入图片说明

I've tried:

  • moving the files in and out.
  • cleaning the build folder.
  • restarting Xcode
  • restarting my machine

Any other ways to get Xcode to recognize the SDKs?

What do you have under your xcodeproj, for your target, under the General tab and Deployment info? Can you select another iOS version?

Similarly for your projet (instead of target)? 在此处输入图片说明

The problem had to do installing multiple versions of Xcode and the 7.0.1 update installing in an unexpected place.

Here's what my Applications folder looked like before I fixed things:

Xcode -> Xcode 7.0
/Xcode6/Xcode -> Xcode 6.0.1
/Xcode6.4/Xcode -> Xcode 7.0.1

Notice how the 6.4 folder points to 7.0.1? Not good.

I must've had 2 versions of Xcode 7.0 installed. One I know I downloaded a dmg and the other I must have updated via the Mac App Store.

That means that when I went to look in the standard place: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

...I was looking at Xcode 7.0, even though it was in the Applications folder and not a subfolder!

In the end I reorganized my Applications folder like this:

Xcode -> Xcode 7.0.1
/Xcode6/Xcode -> Xcode 6.0.1
/Xcode7.0/Xcode -> Xcode 7.0

I also had to delete and re-add the 8.X SDKs but got it working again after that!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM