선생님, 개발을 잘하고 싶어요.

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option 해결하기 본문

개발/android 개발

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option 해결하기

알고싶은 승민 2020. 7. 23. 22:40

최신 스펙을 사용하려면 이런 에러에 종종 부딪힌다.

 

이럴 땐, app 단위 gradle 파일에 다음과 같은 내용을 추가 해주면 된다.

 

android {    
    ...
    
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }  
    
    ...
}
Comments