Kotlin / kmp-integration-sample

Apache License 2.0
100 stars 50 forks source link

Cannot build the project in Xcode #6

Closed mezhnik closed 3 years ago

mezhnik commented 3 years ago

I get this error when I try to build the SimpleLoginIOS project in Xcode:

/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead. .Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Command PhaseScriptExecution failed with a nonzero exit code Here are some details: Gradle 7.x requires Java 11. So I had to specify Java 11 in Android Studio preferences > Build, Execution, Deployment > Build Tools > Gradle Can the problem be related to the fact that Java 11 doesn't support the extensions mechanism? Or is there another reason behind the error? Thank you
mezhnik commented 3 years ago

Gradle was configured to use Java 11 while the JAVA_HOME variable was set to Java 8. Setting JAVA_HOME to Java 11 fixed the issue.