250x250
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 온도조절기
- __attribute__
- IOT
- 에버노트
- EditText
- 기름보일러
- 경동
- npm moment
- todoist
- xcode11
- 나비엔
- Swipes
- anydo
- node.js
- ReactNative
- REACT
- debounce
- 네모안
- nodejs
- Raspberry Pi
- evernote
- 난방비절약
- 라온익스
- react-native
- Node
- 린나이온도조절기
- rasppi3
- 온도센서
- 가스요금폭탄
- 가스비절약
Archives
- Today
- Total
어허
[Android] target SDK 31로 변경 후 푸쉬 에러, FLAG_IMMUTABLE 처리 본문
728x90
Process: com.project.myproc, PID: 32104
java.lang.IllegalArgumentException: com.project.myproc: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
최근 앱스토어 등록 시 target sdk version을 올려야 한다는 경고가 나와서 31로 변경
큰 변경사항 없이 정상 동작 확인
등록 후 푸쉬메세지 오지 않는 문제 발생
디버깅 해보니 위와같은 에러 발생
해결 >>>
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
위 처럼 플래그를 꼭 명시해주어야 한다.
MUTABLE / IMMUTABLE 두가지가 있고
변경가능, 불가능인것 같다.
compileSdkVersion 31
minSdkVersion 17
targetSdkVersion 31
com.google.firebase:firebase-cord:16.0.1
com.google.firebase:firebase-messaging:17.5.0
728x90
'개발 > Android' 카테고리의 다른 글
Keystore was tampered with, or password was incorrect (0) | 2019.09.16 |
---|---|
view.getTag() NullPointerException 실수 조심 (0) | 2018.01.22 |
[Android] EditText 키보드 바로 올라오게 하기 (0) | 2016.09.23 |
[Android] NumberPicker 음수 표현방법 (0) | 2016.03.11 |
Comments