There is no SDK with the name or path “iphoneos4.0”

后端 未结 15 899
予麋鹿
予麋鹿 2021-02-06 23:36

I download a sample of UICatalog and run it.When I compile it ,it shows the failed message:There is no SDK with the name or path \"iphoneos4.0\".I find the \"Base SDK\" of UICat

相关标签:
15条回答
  • 2021-02-07 00:06

    dkk's answer is what made things work for me. I had to change the Base SDK on the target and not just the project. Perhaps you have to do both.

    0 讨论(0)
  • 2021-02-07 00:08

    I got this error when one of my configurations still referenced an old (iOS) SDK. Note that the error shouldn't have come up when I tried to build a totally different configuration (with correct Base SDK setting), so this smells like an XCode bug to me. People suggesting that you don't set the base SDK in at target-level have probably never created projects which contain targets for different platforms all in one project file (in my case Mac and iOS targets, so setting the base SDK once in the project file is nonsense advice).

    0 讨论(0)
  • 2021-02-07 00:09

    Ok, so I struggled through this too. Based on some of the answers above and from the apple development forum, I was able to figure out what worked for me.

    In XCODE, if you notice that the pull down at the top left of the window says "BASE SDK MISSING", you are going to get this error "There is no SDK with the name or path “iphoneos4.0”". To fix the problem:

    1. double click on Group & Files in the upper part of the left pane of xcode. This will open a window

    2. go to the Build tab of the new window

    3. click on the row that says "BaseSDK" and select "Latest iOS (currently set to iOS 3.2)

    4. The Configurations pull down near the top should now say "All Configurations". If not, set it.

    5. close the window.

    6. Now if you try to build, you will get a different error, something like: Code Sign error: The identity 'iPhone Developer: x Xxxxx' doesn't match any identity in any profile ...

    7. So, now what you need to do in xcode is to click on the pull down in the upper left corner (the pull down that had the original BASE SDK MISSING indication, but probably has something different now), and make sure that both "Simulator" and "Debug" are checked as options in the pull-down.

    8. now you should be good to go.

    0 讨论(0)
  • 2021-02-07 00:10

    Ok, I've solved it.

    1. In Groups & Files go to Targets and select your target.
    2. Press Ctrl+I (or open the info in some other way)
    3. Set the Base SDK of your target

    (The Base SDK should also be set at the project)

    0 讨论(0)
  • 2021-02-07 00:10

    I was having the same problem and what I did to solve it was:

    1. Go to Menu Project
    2. Go to Set Active SdK
    3. Select the option SIMULATOR instead of DEVICE
    4. Build and Run and the ERROR has gonne!

    I hope it works for you guys... =)

    0 讨论(0)
  • 2021-02-07 00:12

    After loading the project into XCode..

    Under Groups and Files

    1. right click on UICatalog<-(or your demo project name) and select Get Info

    2. in Base SDK select IOS Simulator 4.1

    3. Close and save info pane

    4. expand Targets exposing UICatalog<-(or demo project name)

    5. right click on UICatalog and select Get Info

    6. in Base SDK select IOS Simulator 4.1

    Combo box in UICatalog project pane (upper left corner) should switch to "Device - 4.1 | Debug" instead of "No Base SDK"

    if you Build and Run at this point you might get another error. If so, open the UICatalog combo and switch from Device to Simulator

    The "official link" mentioned above states…

    "Note: Targets can override build settings defined at the Project level. "

    ..but should probably read "will" instead of "can"

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