flutter - 即使安装了包,它也没有显示在 dart 包文件夹中
问题描述
我在安装这个包时遇到问题https://pub.dev/packages/graphql_flutter/install它的依赖项之一是这个 graphql 包https://pub.dev/packages/graphql. 当我做 pub get it installs 时,它会显示 dart 包文件夹中 graphql 包的所有期望。我曾尝试单独安装 graphql 包,但该包仍然没有显示出来。并且导入仍然给出错误“URI目标不存在:'package:graphql/client.dart'。” 但它确实出现在 flutter/.pub-cache/hosted/pub.dartlang.org 中,所以我不明白为什么它没有出现在我的项目中。我尝试过使用flutter clean、flutter clean pub cache和androidstudio的invalidate caches/restart功能,但无济于事。我也尝试过多次重启 android studio 和我的电脑。我也尝试过以管理员身份运行 androidstudio。
解决方案
它最终在 3 天后被随机修复。我刚刚启动了android studio并再次尝试,突然它起作用了。不知道最后是怎么解决的
推荐阅读
- java - 是否可以将 Spring Integration 用于带有 ExecutorChannel 的批处理或带有 Task Executor 的 Pollers
- php - 这是“隐藏”数据库凭据的足够好方法吗?
- python - 不应该的 Traceback 和 AttributeError
- blazor - 其他组件调用方法时,Blazor 组件不更新 UI
- python - 熊猫布尔索引是否需要中间变量?当我不使用时出现语法错误
- python - 如何在命令 discord.py 中检查多个反应
- python - Monthly Sales - Totals 命令将仅显示 1 个月而不是全部 12
- android - Android- Qt - Protobuf:使用 ndk 的预构建工具链编译 protobuf
- node.js - 如何提高使用 axios 的代码的优雅性?
- python - Jupyter Notebook 导出的 HTML 深色