Prajnaranjan Das
Prajnaranjan Das

Reputation: 1428

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:

Screenshot Screen Shot of Terminal

Question

How to solve this error ?

Anyones help will be really appriciated.

Upvotes: 62

Views: 16250

Answers (4)

user7856874
user7856874

Reputation: 15

I had to do the following to resolve:

xcode-select --install

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

Upvotes: 1

Abdul Karim Khan
Abdul Karim Khan

Reputation: 4935

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

enter image description here

Upvotes: 0

benhorgen
benhorgen

Reputation: 1955

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.

Upvotes: 0

Nayan Bhana
Nayan Bhana

Reputation: 1314

CommandLineTools is outdated. The below should fix it.

xcode-select --install

Upvotes: 128

Related Questions