【问题标题】:Conflict using flutter_icons_launcher with flutter_icons packages使用flutter_icons_launcher与flutter_icons包冲突
【发布时间】:2020-10-23 12:01:57
【问题描述】:

我想使用 flutter icons launcher 包来更改我的应用的启动器图标

dev_dependencies:
  flutter_launcher_icons: "^0.7.3"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"

但随后我收到“flutter_icons:”的包定义冲突的错误,因为包flutter icons 也使用flutter_icons: 定义,如下所示

dependencies:
  flutter_icons: ^1.1.0

有没有办法在同一个项目中使用这两个包?

【问题讨论】:

    标签: android ios flutter visual-studio-code flutter-dependencies


    【解决方案1】:

    将你的第二个flutter_icons:向后移动一个空格,你就可以开始了。

    在您的代码中,您正在这样做

    dev_dependencies:
      flutter_test:
        sdk: flutter
      flutter_launcher_icons: ^0.9.0
    
      flutter_icons:
      android: "launcher_icon"
      ios: true
      image_path: "assets/logo.png"
    

    你应该这样做

    dev_dependencies:
      flutter_test:
        sdk: flutter
      flutter_launcher_icons: ^0.9.0
    
    flutter_icons:
      android: "launcher_icon"
      ios: true
      image_path: "assets/logo.png"
    

    注意:在上面的问题中,你写得很好,但在你的真实代码中你写错了。

    【讨论】:

      猜你喜欢
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-23
      • 2021-11-21
      • 2012-11-22
      • 1970-01-01
      • 2020-06-24
      相关资源
      最近更新 更多