Dart & Flutter

[Flutter/Android] android.app.RemoteServiceException: Bad notification posted from package Couldn't update icon: StatusBarIcon

ju_young 2023. 4. 26. 10:28
728x90

drawable이라고 새로 icon을 만들고 build.gradle에서 shrinkResources true 라고 추가했다면 위와 같이 res/raw/keep.xml 을 추가해주어야한다.

 

keep.xml 안에는 다음과 같은 내용을 추가해주면 된다.

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@drawable/*"/>

 

[reference]

https://developer.android.com/studio/build/shrink-code?hl=ko#keep-resources

728x90