Hyeyeon blog

'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. λ³Έλ¬Έ

개발/Android

'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.

Hyeyeon.P 2024. 4. 8. 18:41
λ°˜μ‘ν˜•

πŸ€“

AGP 7.4.0 μ΄μƒμ—μ„œ λ°œμƒν•˜λŠ” 문제둜,

μ•„λž˜μ™€κ°™μ΄ build.grale(app)에 JVM λŒ€μƒμ˜ JDK 버전을 λͺ…μ‹œν•˜μ—¬ ν•΄κ²°ν•  수 μžˆλ‹€. 

kotlin {
    jvmToolchain(17)
}

android { 
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.toString()
    }
    
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
}
728x90
Comments