Flutter Could not resolve project :path_provider_macos.



解決方案:先clean,再repair


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...

  

錯誤信息:

* 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形式被原生項目依賴,那么有可能不行,這時候,就按報錯提示修復,原生項目找到

 

path_provider_macos 相關文件夾,有可能有多個,刪除項目報錯那個,重新編譯運行即可。





如果需要使用path_provider_macos相關的東西。
path_provider_macos這個module,找到對應本地的目錄,把其他版本對應的android目錄下文件拷貝到報錯這個版本的android目錄下就解決了。



一般path_provider_macos目錄在

   xxx/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/下。

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM