https://kotlinlang.org logo
#getting-started
Title
# getting-started
d

Daniele B

12/09/2020, 7:20 PM
Android Studio is giving me a warning that I should use Java 11. I have installed it here: /Library/Java/JavaVirtualMachines/jdk-11.0.9.jdk Can you please explain how I can configure Android Studio (or my app) to use it?
a

Alejandro Rios

12/09/2020, 7:23 PM
You can set it up directly on your project(This is Artic fox)
d

Daniele B

12/09/2020, 7:25 PM
thanks!
👍🏼 1
In my Android gradle file I am still mentioning these:
Copy code
compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = "1.8"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
        freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check", "-Xskip-metadata-version-check")
    }
}
do I need to remove them?
a

Alejandro Rios

12/09/2020, 7:35 PM
I did the setup that I mentioned before for one of the compose codelabs (Theme) also I updated the compose version to alpha08
d

Daniele B

12/09/2020, 7:40 PM
so you also kept references to Java 1.8
a

Alejandro Rios

12/09/2020, 7:41 PM
Yup
👍 2
3 Views