Flutter Could not resolve project :path_provider_macos.
1 2 3 4 5 6 7 8 | <br>解决方案:先clean,再repair<br>ZBMAC-C02VQ1ZYO:d$ flutter clean Cleaning Xcode workspace... 2.5s Deleting build... 258ms Deleting .dart_tool... 4ms Deleting .android... 6ms Deleting .ios... 6ms ZBMAC-C02VQ1$ flutter pub cache repair Resetting Git repository for flutter_boost 1.9.1+1... |
错误信息:
1 2 3 4 5 6 7 8 | * What went wrong: Could not determine the dependencies of task ':path_provider:compileDebugAidl' . > Could not resolve all task dependencies for configuration ':path_provider:debugCompileClasspath' . > Could not resolve project :path_provider_macos. Required by : project :path_provider > Unable to find a matching configuration of project :path_provider_macos: - None of the consumable configurations have attributes. |
如果是在纯Flutter项目执行,这样基本就修复了。
如果是Flutter以Module形式被原生项目依赖,那么有可能不行,这时候,就按报错提示修复,原生项目找到
1 | path_provider_macos 相关文件夹,有可能有多个,删除项目报错那个,重新编译运行即可。 |
1 | <br>如果需要使用path_provider_macos相关的东西。 |
1 | path_provider_macos这个module,找到对应本地的目录,把其他版本对应的android目录下文件拷贝到报错这个版本的android目录下就解决了。<br><br> |
1 | <br>一般path_provider_macos<em id= "__mceDel" >目录在</em> |
xxx/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/下。
时刻怀有一颗虔诚之心,乐于分享。知识才更有意义。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步