当前位置: 首页 > news >正文

Flutter 使用 device_info_plus 遇到的问题

问题:引用device_info_plus 插件出现了异常,不知道为啥打开项目的时候就不能用了。

解决:改了版本解决

Target of URI doesn't exist: 'package:device_info_plus/device_info_plus.dart'. 
(Documentation)  Try creating the file referenced by the URI, or try using a URI for a filethat does exist.

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在项目中用的是9.1.0,然后改成 3.0.2就行了

在这里插入图片描述
而后,又出现如下的错误:两个依赖的版本冲突了,哎,把 package_info_plus 去掉吧,如果没有使用到,或者换插件换插件,其他不知道怎么解决了

Because device_info_plus >=3.2.1 <4.0.1 depends on device_info_plus_windows ^2.1.1 and device_info_plus >=2.1.0 <3.2.1 depends on device_info_plus_windows ^2.1.0, device_info_plus >=2.1.0 <4.0.1 requires device_info_plus_windows ^2.1.0.
And because device_info_plus_windows >=1.0.0-nullsafety.0 <3.0.0 depends on win32 ^2.0.0 and package_info_plus >=4.0.1 depends on win32 >=4.0.0 <6.0.0, device_info_plus >=2.1.0 <4.0.1 is incompatible with package_info_plus >=4.0.1.
So, because a302 depends on both package_info_plus ^4.2.0 and device_info_plus ^3.0.2, version solving failed.You can try the following suggestion to make the pubspec resolve:
* Try upgrading your constraint on device_info_plus: flutter pub add device_info_plus:^9.1.0
Process finished with exit code 1
http://www.lryc.cn/news/238094.html

相关文章:

  • 论文阅读:“基于特征检测与深度特征描述的点云粗对齐算法”
  • [python]python筛选excel表格信息并保存到另一个excel
  • 使用kafka_exporter监控Kafka
  • 基于Bagging集成学习方法的情绪分类预测模型研究(文末送书)
  • Java算法(八)手写String集合元素去重的两种实现方式 正序 逆序 删除集合中符合条件的字符串
  • Linux的简单使用
  • OpenCV技术应用(4)— 如何改变图像的透明度
  • SpringCloud之Feign
  • 股票池(三)
  • 如何搭建测试环境?一文解决你所有疑惑!
  • 【JVM】JVM异常不打印堆栈信息 [ -XX:-OmitStackTraceInFastThrow ]
  • 第十一章 目标检测中的NMS
  • vue项目中使用vant轮播图组件(桌面端)
  • 如何做好性能压测 —— 压测环境设计和搭建!
  • 手机弱网测试工具:Charles
  • Axios七大特性
  • 【机器学习基础】K-Means聚类算法
  • Vite - 配置 - 自动修改 index.html 中的title
  • 基于安卓android微信小程序美容理发店预约系统app
  • *** stack smashing detected ***: terminated
  • 鸿蒙系统扫盲(二):再谈鸿蒙是不是安卓套壳?
  • PG数据中DBeaver上传csv文件作为数据表
  • 第十七篇-Awesome ChatGPT Prompts-备份-百度翻译
  • [Android] Amazon 的 android 音视频开发文档
  • UE4基础篇十六:自定义 EQS 生成器
  • 轿车5+1汽车变速器变速箱同步器操纵机构机械结构设计CAD汽车工程
  • STM32F4移植SPI注意事项
  • CV计算机视觉每日开源代码Paper with code速览-2023.11.16
  • Git 简介及使用(1)
  • HTTPS流量抓包分析中出现无法加载key