관리 메뉴

나만을 위한 블로그

[Android] ButterKnife 사용 중 java.lang.BootstrapMethodError: Exception from call site #1 bootstrap method 에러 본문

Android

[Android] ButterKnife 사용 중 java.lang.BootstrapMethodError: Exception from call site #1 bootstrap method 에러

참깨빵위에참깨빵 2019. 12. 3. 17:07
728x90
반응형

버터나이프를 쓰던 중 이런 에러가 났다.

 

java.lang.BootstrapMethodError: Exception from call site #1 bootstrap method

 

구글에 쳐보니 깃허브 쪽에서 나와 같은 질문을 한 사람이 있었고 그 질문에 답이 달렸다.

 

버터나이프를 쓰려면 내 빌드에서 자바 8을 버전 9.0.0 이상에서 작동하도록 설정해야 한다.

앱 수준의 gradle 파일에 아래와 같은 문장을 buildTypes 밑에 추가해야 한다.

 

compileOptions {
targetCompatibility = "8"
sourceCompatibility = "8"
}

 

컴파일 옵션의 타겟 호환성, 소스 호환성을 자바 8로 맞춰주면 된다.

이렇게 해 주면 정상적으로 사용 가능하다

반응형
Comments