簡體   English   中英

使用flutter_icons_launcher與flutter_icons包沖突

[英]Conflict using flutter_icons_launcher with flutter_icons packages

我想使用flutter 圖標啟動器package 更改我的應用程序的啟動器圖標

dev_dependencies:
  flutter_launcher_icons: "^0.7.3"

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

但后來我收到一個錯誤,因為 package flutter 圖標使用flutter_icons:定義也如下

dependencies:
  flutter_icons: ^1.1.0

有沒有辦法在同一個項目中使用這兩個包?

將你的第二個flutter_icons:向后移動一個空格,你就可以使用go。

在您的代碼中,您正在這樣做

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"

注意:在上面的問題中,你寫得很好,但在你的真實代碼中你寫錯了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM