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/下。

 

 

posted @   狂奔的小狮子  阅读(2567)  评论(9编辑  收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示