Try creating the file referenced by the URI, or Try using a URI for a file that does exist.darturi_does_not_exist

 

flutter问题如下:在添加组件的时候报错,pubspec.yaml中的组件正常加载,但是在页面引入组件会报错

 

 

Type: String

Target of URI doesn't exist: 'package:getwidget/getwidget.dart'.
Try creating the file referenced by the URI, or Try using a URI for a file that does exist.darturi_does_not_exist

 项目版本:

文件里显示

 

 

 然而flutter3项目的sdks版本和flutter2的差不多是一样的

 

我真是纠结无语了,然后正常引入会出的问题,直接使用,依然有效果,可能是vscode的问题,不要看页面报错就是引入失败,一定要试试

 

只要是组件能正常pub get就行

 页面报错,但是真机正常显示

 

 

 

 

 

posted @   lude1994  阅读(437)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
历史上的今天:
2019-11-28 react-native-image-zoom-viewer的使用
2018-11-28 adb server version (39) doesn't match this client (40); killing...
点击右上角即可分享
微信分享提示