-
-
Notifications
You must be signed in to change notification settings - Fork 504
Closed
Labels
Description
After recent Flutter 1.12 update building release APK with flutter build apk
started to shrink unused resources. It might as well be something I missed during migration to the new Flutter version but it was quite painful to figure out.
:android:shrinkDebugResources
Removed unused resources: Binary resource data reduced from 2570KB to 1711KB: Removed 33%
As I was using custom icons for notification buttons and they were not referenced anywhere except Dart code it made them disappear from release apk.
MediaControl playControl = MediaControl(
androidIcon: 'drawable/ic_action_play_arrow',
label: 'Play',
action: MediaAction.play,
);
I suggest documenting that somewhere in code or README.
In my case adding shrinkResources false
into build.gradle solved the problem.
buildTypes {
release {
signingConfig signingConfigs.debug
shrinkResources false
}
}
mohammadne