微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Flutter之导url_launcher包提示 A dependency may only have one source.

1、问题

Flutter项目在pubspec.yaml导入url_launcher包,然后点击Pub get错误提示如下

F:\Flutter_sdk\Flutter\bin\Flutter.bat --no-color pub get
Running "Flutter pub get" in Flutter_1...                       
Error on line 25,column 5 of pubspec.yaml: A dependency may only have one source.

   ╷

25 │ ┌     sdk: Flutter

26 │ │     url_launcher: ^5.5.0

27 │ │ 

28 │ │ 

29 │ │   # The following adds the Cupertino Icons font to your application.

30 │ │   # Use with the CupertinoIcons class for iOS style icons.

31 │ │   cupertino_icons: ^0.1.3

   │ └──^

   ╵
pub get Failed (65;    ╵)
Process finished with exit code 65

 

 

 

 

 

2、分析

cupertino_icons和url_launcher关键字没有左对齐

 

 

 

 

 


3、解决办法

让cupertino_icons和url_launcher关键字左对齐,然后再点击Pub get更新包就行

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐