Search code examples
kotlin-multiplatformcompose-multiplatform

How to fix build failed for ios project on xcode


so I have project compose multiplatform, when I run on android studio I could build the project and run (android + ios) in emulator in android studio, but when I try to open part of iosApp project in xcode i got build failed, I already try to clean build + build again but still the build got failed, how to fix this issue ? Thanks

This is the error message enter image description here


Solution

  • Check the message at bottom, it said: The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. Generally, it means your Xcode can't find your JAVA correctly. Try install JAVA in your mac and set the JAVA_HOME to your path. Follow details in this post: Java Runtime not found