![](/img/trans.png)
[英]Flutter and Dart plugin not installed errror when downgrade flutter even though they are installed on android studio
[英]Package is not showing up in the dart packages folder even though it is installed
我在安裝這個包https:\/\/pub.dev\/packages\/graphql_flutter\/install<\/a>時遇到了問題,它的依賴項之一是這個 graphql 包https:\/\/pub.dev\/packages\/graphql<\/a> 。 當我做 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。
這是我的 Dart 包文件夾的一部分,你可以看到它沒有顯示
這是我電腦上的 pub.dartlang.org 文件夾
看到這個問題好幾次了。 在 Windows 中打開任務管理器並檢查 adb.exe。 應該有一個副本在運行。 我有 2 個副本,因此刪除了 1 個並重新啟動了另一個。
右鍵單擊 --> 結束兩者的任務。
那么一切都好。
它最終在 3 天后得到隨機修復。 我剛剛啟動了 android studio 並再次嘗試,突然它起作用了。 不知道最后是怎么解決的
重新加載VS代碼對我有用..
可以重新加載 ---> Mac 的Command + R。<\/strong>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.