flutter打包时报错

报错信息:This application cannot tree shake icons fonts. It has non-constant instance

  • What went wrong:
    Execution failed for task ‘:app:compileFlutterBuildRelease’.

Process ‘command ‘D:\software\flutter\bin\flutter.bat’’ finished with non-zero exit value 1
flutter打包时报错_第1张图片
查看问题,是引入的阿里矢量图标icon除了问题
根据提示信息查看了对应文件
在这里插入图片描述
就加了个const,运行就好用了

你可能感兴趣的:(flutter,flutter)