안드로이드 앱 개발시 아주 간혹 발생하는 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. |
'안드로이드 개발' 카테고리의 다른 글
HAXM installation failed 해결방법 (0) | 2023.05.07 |
---|---|
Error: Activity class MainActivity does not exist 해결 (0) | 2023.05.06 |
AssertionError 해결 방법 (0) | 2023.05.06 |
android.view.WindowManager$BadTokenException 해결 (1) | 2023.05.05 |
ArithmeticException 해결 방법 (0) | 2023.05.04 |