본문 바로가기
IT/Android

Android] Targeting s+ (version 31 and above) requires that one of flag_immutable or flag_mutable 대응 / 안드로이드 12

by 깻잎쌈 2022. 6. 16.
반응형

https://developer.android.com/about/versions/12/behavior-changes-12?hl=ko 

 

동작 변경사항: Android 12를 타겟팅하는 앱  |  Android Developers

Android 12를 타겟팅하는 앱에 영향을 주는 Android 12의 변경사항을 알아봅니다.

developer.android.com

 

0 대신 PendingIntent.FLAG_MUTABLE를 추가한다.

 

 val pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_MUTABLE)

 

 

 

 

https://onedaycodeing.tistory.com/159

 

안드로이드 12 PendingIntent 이슈 및 대응

 java.lang.IllegalArgumentException: com.example.myapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a Pend..

onedaycodeing.tistory.com

 

반응형

댓글