4

I'm trying to run both a brand new KMM application, and an existing KMM application I had created before, and when I try to run the iOS version out of Android Studio I don't have an iOS configuration.

enter image description here

When I go create an iOS configuration I get an error that must be fixed first. When I push on "fix it" button, the gradle.properties file creates a new line of xcodeproj=iosApp/iosApp.xcodeproj

This is both wrong, and duplicated.

enter image description here

enter image description here

If I remove either of the duplicated xcodeproj lines, the error continues and I get a new line when I fix it (again). If you repeat this process you can also end up with many of the new xcodeproj lines, all with the wrong location. Modifying the location to the correct location also doesn't solve the problem.

enter image description here

Any thoughts? Seems like a bug in Android Studio 4.1.2.

Here are the details of the Android Studio version:

Android Studio 4.1.2 Build #AI-201.8743.12.41.7042882, built on December 19, 2020 Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.7 GC: ParNew, ConcurrentMarkSweep Memory: 1979M Cores: 12 Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, debugger.watches.in.variables=false Non-Bundled Plugins: com.intellij.lang.jsgraphql, org.jetbrains.kotlin, com.jetbrains.kmm

TooManyEduardos
  • 4,206
  • 7
  • 35
  • 66
  • Hi I just tried running a new and old KMM application in A.S - 4.1.2 and it did worked fine for me. Also from the screenshot you have posted I can see that for iOS App scheme has not been selected can you please check if you have scheme named `iosApp` in the drop down list. I don't see any wrong in the `gradle.properties` file. – WhiteSpidy. Feb 05 '21 at 07:20
  • I tried to reproduce it locally, but with no luck. What are your Kotlin and KMM plugin versions? – Artyom Degtyarev Feb 05 '21 at 08:11
  • KMM version: `0.2.0-release-65-Studio4.1`. Kotlin version: `1.4.30-release-Studio4.1-1`. Android Studio 4.2 Beta 4 works though – TooManyEduardos Feb 05 '21 at 16:27
  • versions are also the same which I used did you get `iosApp` in the dropdown ? – WhiteSpidy. Feb 05 '21 at 16:50
  • nope. no ios in any dropdown due to error that cannot be fixed (and duplicates itself) – TooManyEduardos Feb 05 '21 at 17:55
  • Which version of Xcode are you using also can you please check if you have set `Command Line Tools` in your Xcode ? You can check from :- `Xcode -> Preferences -> Locations -> Command Line tools` – WhiteSpidy. Feb 09 '21 at 10:40
  • Try this :- https://youtrack.jetbrains.com/issue/KT-44805 – WhiteSpidy. Feb 10 '21 at 12:11
  • Does this answer your question? [How to configure an iOS Application for Kotlin Multiplatform in Android Studio?](https://stackoverflow.com/questions/66117869/how-to-configure-an-ios-application-for-kotlin-multiplatform-in-android-studio) – Artyom Degtyarev Mar 18 '21 at 08:36
  • i gave up, but thanks for reaching out though – TooManyEduardos Mar 18 '21 at 20:15

0 Answers0