0

I am using xcode(v13.4.1) to build a flutter app, when I first build the app, shows error like this:

This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:

and I found the answer from This application cannot tree shake icons fonts. and add some parameter in xcode like this:

enter image description here

but did not work, am I missing something? what should I do to fixed this problem?

Dolphin
  • 29,069
  • 61
  • 260
  • 539

1 Answers1

2

You should be able to set a flag within the User-defined variables in Xcode in order to disable tree shaking icons.

  1. Select the top most Runner in the left pane.
  2. Press Build Settings and scroll all the way down.
  3. Add TREE_SHAKE_ICONS with a value of false as in the image below.

enter image description here

I hope this helps!

Iruoy
  • 96
  • 1
  • 3