ChatGPT解决这个技术问题 Extra ChatGPT

Git: Error: Unable to read SDK settings for MacOSX.sdk

Error while adding in git after updating to new OS Mojave

Error

git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

Error faced in:

Device: MacBook Pro (Retina, 13-inch, Early 2013)

OS: MacOS Mojave

https://i.stack.imgur.com/eW47t.png

Question

How to solve this error ?

Anyones help will be really appriciated.


N
Nayan Bhana

CommandLineTools is outdated. The below should fix it.

xcode-select --install

It worked for me. So I'm upvoting. Mojave on MBP 15 2017 using iTerm.
I wish it could work, but I need to download the Command Line Tools, because the problem Can't install the software because it is not currently available from the Software Update server. Then I refer to the link(stackoverflow.com/questions/19907576/…) found the update. But There isn't Command Line Tools(macOS 10.14) for Xcode 9.4.1
worked for me too, should be default for xcode. how often did we already did this in the past and how often will we doing this... thx for the answer/reminder
u
user7856874

I had to do the following to resolve:

xcode-select --install

sudo xcode-select -switch /Library/Developer/CommandLineTools

b
benhorgen

Since I had just updated Xcode (using the AppStore) I had to open Xcode and let the installer finish some configuration work before Visual Studio for Mac would successfully compile my Android application again.

I thought this was weird because my solution did not include any projects targeting iOS. The solution contained just a few .NET Core library projects and an Android APK.

I also had to run the 'xcode-select --install' command.


A
Abdul Karim Khan

You can simply go to Xcode Preferences > Locations > Command Line Tools > Select latest Xcode version

https://i.stack.imgur.com/X1tmJ.png