dart Flutter版本3.3.2,在D:\flutter上的通道未知上游存储库未知

deyfvvtc  于 2023-04-09  发布在  Flutter
关注(0)|答案(2)|浏览(296)

所以我想升级flutter版本,但当我运行flutter doctor时,出现此错误

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel unknown, 3.3.2, on Microsoft Windows [Version 10.0.19044.2130], locale en-GB)
    ! Upstream repository unknown
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Professional 2019 16.4.5)
      workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.73.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 2 categories.

然后,当我运行flutter upgrade命令时,出现此错误。

ProcessException: Process exited abnormally:
remote: Repository not found.
fatal: repository 'https://github.com/MuhammadFaisalIchal/Flutter-Travel-Pesawat-App.git/' not found
  Command: git fetch --tags

我知道,这可能是因为存储库的网址被卡在那个网址上,但我不知道如何修复它。
我不知道为什么仓库的网址被卡住了,因为我已经删除了仓库。
如何解决这个问题?感谢您的任何建议或解决方案。

jdgnovmf

jdgnovmf1#

我终于设法修复了它,虽然目前我可以在3.3.2版本中进行调试和开发而没有任何问题,但从长远来看肯定会有问题,所以我决定尽快修复它。
我所做的是将我所在地区的Flutter SDK文件更新到最新版本,您可以在这里获得。
1.将当前Flutter SDK文件夹重命名为另一个名称(* 用于备份目的 *)示例:D:\fluttersdkD:\fluttersdk_backup
1.您可能无法直接重命名,因为此文件夹被某些程序使用,您可以按照this tutorial解决。
1.使用动态稳定版本,如文档所述,来自Github仓库
1.如果您使用的是Git存储库,则可能会遇到此错误,
fatal: detected dubious ownership in repository at 'D:/flutter' 'D:/flutter/.git' is owned by:,则可以按照错误终端的建议,使用命令git config --global --add safe.directory D:/flutter来解决它
1.运行flutter doctor
1.运行flutter pub get
如果没有问题,您应该能够立即像开始时那样再次开发应用程序

js5cn81o

js5cn81o2#

在我的例子中,不是git for windows执行C:\cygwin64\bin\git导致的错误
发生错误时

PS C:\Users\i> where.exe git
C:\cygwin64\bin\git.exe
C:\Program Files\Git\cmd\git.exe

操作:cygwin git rename git.exe -〉git.exe.old
解决错误时

PS C:\cygwin64\bin> where.exe git
C:\Program Files\Git\cmd\git.exe

C:\Users\i\Documents\app\dev>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.9.0-22.0.pre.102, on Microsoft Windows [Version 10.0.22621.1413], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.1)
[✓] Android Studio (version 2022.1)
[✓] Connected devices (3 available)
[✓] Network resources

• No issues found!

相关问题