Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This application cannot tree shake icons fonts. It has non-constant instances of IconData #1

Open
elirehema opened this issue Apr 3, 2021 · 6 comments

Comments

@elirehema
Copy link

flutter build apk break with warning message

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

  • file:///home/eli/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/file_icon-1.0.0/lib/file_icon.dart:34:7

FAILURE: Build failed with an exception.

@pd4d10
Copy link
Member

pd4d10 commented Apr 4, 2021

Yeah, because the code point is dynamic. --no-tree-shake-icons is required

@elirehema
Copy link
Author

@pd4d10 my suggestion was you should include that information to README i have struggled with CICD build failures about to drop the plugin then i found that solution in SO.

@pd4d10
Copy link
Member

pd4d10 commented Apr 4, 2021

Thanks! It's a good idea.

Could you please update your PR to add this?

@elirehema
Copy link
Author

@pd4d10 i have made PR

@pd4d10
Copy link
Member

pd4d10 commented Jun 6, 2021

Unfortunately #2 would not work, because the file name is dynamic

The alternative way is to add this info in readme

@romanr
Copy link

romanr commented Oct 27, 2023

why not add this in README? everybody stumble on the same error and waste time looking for solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants