https://kotlinlang.org logo
Title
r

Rak

10/19/2021, 1:03 PM
Hi, just created my first project using the Kampkit. Android builds fine and launches but iOS complains with the message: Showing Recent Messages An exception occurred applying plugin request [id: ‘com.android.application’]
Failed to apply plugin ‘com.android.internal.application’.
  > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.    You can try some of the following options:     - changing the IDE settings.     - changing the JAVA_HOME environment variable.     - changing
org.gradle.java.home
in
gradle.properties
. JAVA_HOME is set to java 11 so not sure what to do. This is when i try to run from XCode.
f

Francis Mariano

10/19/2021, 1:13 PM
You can set JAVA_HOME to java11 before executing the embedAndSignAppleFrameworkForXcode task on Xcode. export JAVA_HOME=/path/to/java/11 cd "$SRCROOT/.." ./gradlew 😒hared:embedAndSignAppleFrameworkForXcode
r

Rak

10/19/2021, 1:42 PM
JAVA_HOME is already set
f

Francis Mariano

10/19/2021, 1:48 PM
I see, but setting the JAVA_HOME before embedAndSignAppleFrameworkForXcode task solved the problem for me.
r

Rak

10/19/2021, 2:32 PM
i fixed it by setting the jdk path in the gradle.settings file
not great, though
r

russhwolf

10/19/2021, 6:32 PM
Not sure why it wouldn't pick up JAVA_HOME. Do you have the issue on other compose projects?