안드로이드 개발

BootstrapMethodError 해결 방법

피커 2023. 5. 6. 22:57
728x90
반응형

안드로이드 개발시 아주 간혹 발생하는 BootstrapMethodError 있습니다..

여러가지 BootstrapMethodError 발생해서 디버깅이 쉽지가 않습니다.

 

*. Java 버전 업데이트

-. Build.gradle (App)에서 target 최신으로 변경해줍니다.

   아래 파란색 compileoptions 참고하세요.

 

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

 

 

이후에는 아래처럼 clean build rebuild 메뉴를 통해서 다시 빌드를 해주면 문제가 해결됩니다.

 

 

 

 

Thrown to indicate that an invokedynamic instruction or a dynamic constant failed to resolve its bootstrap method and arguments, or for invokedynamic instruction the bootstrap method has failed to provide a call site with a target of the correct method type, or for a dynamic constant the bootstrap method has failed to provide a constant value of the required type.

Summary

Public constructors
BootstrapMethodError()
Constructs a BootstrapMethodError with no detail message.
BootstrapMethodError(String s)
Constructs a BootstrapMethodError with the specified detail message.
BootstrapMethodError(String s, Throwable cause)
Constructs a BootstrapMethodError with the specified detail message and cause.
BootstrapMethodError(Throwable cause)
Constructs a BootstrapMethodError with the specified cause.
Inherited methods
From class java.lang.Throwable
From class java.lang.Object

Public constructors

BootstrapMethodError

Added in API level 26

public BootstrapMethodError ()

Constructs a BootstrapMethodError with no detail message.

BootstrapMethodError

Added in API level 26

public BootstrapMethodError (String s)

Constructs a BootstrapMethodError with the specified detail message.

 

Parameters
s String: the detail message.

BootstrapMethodError

Added in API level 26

public BootstrapMethodError (String s,
               
Throwable cause)

Constructs a BootstrapMethodError with the specified detail message and cause.

 

Parameters
s String: the detail message.
cause Throwable: the cause, may be null.

BootstrapMethodError

Added in API level 26

public BootstrapMethodError (Throwable cause)

Constructs a BootstrapMethodError with the specified cause.

 

Parameters
cause Throwable: the cause, may be null.

 

반응형