Mobile/Android

[안드로이드] [Firebase] java.lang.BootstrapMethodError: Exception from call site #9 bootstrap method 에러

송코딩 songcoding 2022. 6. 29. 18:31

다들 Bootstrap call site Error가 나면,
compileOption에 자바 버전만 8(Java 1.8)로 바꿔주면 해결된다고 하셨는데,
저는 해결되지 않았습니다!

 

파이어베이스(Firebase) dependencies 추가 하다가 에러를 만난 저의 경우는,
아래 내용과 같이 안드로이드 버전도 바꿔줬더니 해결되었습니다.

해결 방법은 아래와 같습니다.

 

 

build.gradle (Project:) :app 

1) android { } 안에 compileSdkVersion 과 targetSdkVersion을 32로 수정해줬습니다.

(원래 31로 되어있었습니다)

2) android { } 안에 complileOptions { 

                                    targetCompatibility = "8"

                                    sourceCompatibility = "8"

                              }

    을 추가해줬습니다.

android {
    compileSdkVersion 32
    buildToolsVersion "29.0.2"
    defaultConfig {
        ...
        targetSdkVersion 32
        ...
    }
    buildTypes {
        ...
    }

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

 

 

다른 분들께도 도움이 되셨으면 좋겠네요!