icerockdev / moko-template

Template project of a Mobile (Android & iOS) Kotlin MultiPlatform project with the MOKO libraries and modularized architecture
https://moko.icerock.dev/
Apache License 2.0
461 stars 47 forks source link

Java Runtime problem on Big Sur 11.5.2 #38

Closed antranapp closed 3 years ago

antranapp commented 3 years ago

I guest this is not a problem of this template by itself, but more like the mac setup.

I still post a question here in case anyone can help. When running the sample project, I get this error

Screenshot 2021-08-23 at 10 16 48 AM

I have installed java using jenv and can see it in terminal

➜  ~ java --version
openjdk 16.0.2 2021-07-20
OpenJDK Runtime Environment Homebrew (build 16.0.2+0)
OpenJDK 64-Bit Server VM Homebrew (build 16.0.2+0, mixed mode, sharing)
➜  ~ echo $JAVA_HOME
/Users/binhan.tran/.jenv/versions/openjdk64-16.0.2

Not sure how to make Xcode recognises my java runtime. Anyone can help?

Alex009 commented 3 years ago

hi! as i see in log - xcode can't found JDK. we install JDK just from Oracle site, not using jenv. maybe jenv not setup some required for xcode settings and xcode not see java in this case. maybe jenv setup only terminal environment, but not setup current user environment... try install oracle jdk

antranapp commented 3 years ago

Yeah, it is some environment configuration that I need to adjust. Just for future references in case anyone found this issue from Google, I have blogged about them a bit here: https://antran.app/2021/java_installation_ios_android_development_kotlin_multiplatform/

I'll close this issue now.