Could not able run iOSApp in Kotlin multiplatform in Android Studio
Asked Answered
G

2

15

An error occurs when run iOSApp in KMM(Android studio), Could not able to configure schema. please see the attachment.

Error attachment

Garish answered 23/9, 2020 at 14:50 Comment(1)
Hello, @Gan! Please check this particular .xcodeproj file presence. If it exists, try opening it with the Xcode and build from there, just to check if it was not broken during the download or whatever.Comment
S
15

Go to XCode > Preferences > Locations > Command Line Tools => Select desired version of Xcode. This worked for me.

Schinica answered 21/4, 2021 at 5:30 Comment(2)
This helps to fix "Error: Could not detect version of installed Xcode"! You may need to restart android studio after doing this.Khalsa
Thanks @Nilay-Dagdemir. Note: Even if it is already selected, you just need to reselect the Xcode again and then restart the Android Studio.Salford
B
12

Run in console xcode-select --print-path

I got this result /Library/Developer/CommandLineTools

And it should be something like /Applications/Xcode${xcode-number}/Xcode.app

So run in console cd /Applications

Then run in console ls -la

If you see Xcode.app

  • Then you run example 1 in console

Else if you see something like Xcode 8.0.3

  • Then you run example 2 in console

Now you should run this in console sudo xcode-select -switch ${path-to-xcode.app}/Xcode.app

example 1 sudo xcode-select -switch /Applications/Xcode.app

example 2 sudo xcode-select -switch /Applications/Xcode 8.0.3/Xcode.app

Update:

I also found this https://youtrack.jetbrains.com/issue/KT-41691

Brazier answered 20/10, 2020 at 23:6 Comment(1)
This also helps to fix "Error: Could not detect version of installed Xcode"!Amylene

© 2022 - 2024 — McMap. All rights reserved.