如果报如下类似错误

Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.

running Flutter tool: /Users/xxx/Documents/flutter/flutter

previous reference : /Users/xxx/Documents/xxxx/flutter

则在AdroidStuido中terminal

用如下命令

flutter packages upgrade

即可。

如果遇到还有其它文件缺少的库,就找到这个yaml文件,点击右边packages get下载下库就可以了

2.还有一种代码报错解决方案

//        FocusScope.of(context).reparentIfNeeded(node);
        FocusScopeNode _node = node;
        FocusAttachment _nodeAttachment = _node.attach(context);
        _nodeAttachment.reparent();

 

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐