此应用程序无法摇树图标字体 [英] This application cannot tree shake icons fonts

查看:177
本文介绍了此应用程序无法摇树图标字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

flutter构建ios --release为设备(iOS版本)构建com.xxx.xxx ...使用Xcode项目中的指定开发团队自动签名iOS以进行设备部署正在运行Xcode构建...

flutter build ios --release Building com.xxx.xxx for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: C7T4CHU88Y Running Xcode build...

Xcode构建完成.31.8秒无法构建iOS应用Xcode构建错误输出:↳**建立失败**

Xcode build done. 31.8s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **

Xcode的输出:↳此应用程序无法摇晃图标字体.它在以下位置具有IconData的非恒定实例:-file:///Users/user-app/lib/screens/categories/subcategories.dart:830:35-文件:///Users/user-app/lib/screens/home/home.dart:387:17-文件:///Users/user-app/lib/screens/home/home.dart:399:17-文件:///Users/user-app/lib/screens/home/home.dart:411:17-文件:///Users/user-app/lib/screens/home/home.dart:423:17-文件:///Users/user-app/lib/screens/product/all_products.dart:516:31-file:///Users/user-app/lib/screens/tab/saveditems.dart:324:31-file:///Users/user-app/lib/screens/tab/searchitem.dart:496:31

Xcode's output: ↳ This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations: - file:///Users/user-app/lib/screens/categories/subcategories.dart:830:35 - file:///Users/user-app/lib/screens/home/home.dart:387:17 - file:///Users/user-app/lib/screens/home/home.dart:399:17 - file:///Users/user-app/lib/screens/home/home.dart:411:17 - file:///Users/user-app/lib/screens/home/home.dart:423:17 - file:///Users/user-app/lib/screens/product/all_products.dart:516:31 - file:///Users/user-app/lib/screens/tab/saveditems.dart:324:31 - file:///Users/user-app/lib/screens/tab/searchitem.dart:496:31

第一个文件:

                    Column(
                      children: <Widget>[
                        Row(
                          children: <Widget>[
                            new Text(
                              MyLocalizations.of(context).goToCart,
                              style: textBarlowRegularBlack(),
                            ),
                            SizedBox(width: 4),
                            Icon(
                              IconData(
                                0xe911,
                                fontFamily: 'icomoon',
                              ),
                              color: Colors.black,
                            ),
                          ],
                        ),
                      ],
                    ),

推荐答案

尝试使用-no-tree-shake-icons 命令进行构建.

Try build with --no-tree-shake-icons command.

这篇关于此应用程序无法摇树图标字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆