所以我想升级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
我知道,这可能是因为存储库url卡在该网址上,但我不知道如何修复。
我不知道为什么存储库卡在存储库的网址上,因为我已经删除了存储库。
如何解决这个问题?感谢您的任何建议或解决方案。。
我终于修复了它,虽然目前我可以在3.3.2
版本中进行调试和开发,但从长远来看肯定会有问题,所以我决定尽快修复它。
我所做的是将我所在地区的Flutter SDK文件更新到最新版本,您可以在这里获得。
- 将当前Flutter SDK文件夹重命名为其他名称(用于备份(示例:
D:fluttersdk
到D:fluttersdk_backup
- 您可能无法直接重命名它,因为此文件夹已被某些程序使用,您可以按照本教程解决此问题
- 如文档所示,使用来自Github存储库的动态稳定版本
- 如果您正在使用Git存储库
fatal: detected dubious ownership in repository at 'D:/flutter' 'D:/flutter/.git' is owned by:
,则可能会遇到错误,然后您可以按照错误终端的建议使用命令git config --global --add safe.directory D:/flutter
来解决此问题 - 运行
flutter doctor
- 运行
flutter pub get
如果没有问题,您应该能够像开始的一样立即重新开发应用程序
在我的例子中,不是git for windows执行C:\cygwin64\bin\git 时出错
发生错误时
PS C:Usersi> where.exe git
C:cygwin64bingit.exe
C:Program FilesGitcmdgit.exe
操作:cygwin git-rename git.exe->git.exe.old
解决错误时
PS C:cygwin64bin> where.exe git
C:Program FilesGitcmdgit.exe
C:UsersiDocumentsappdev>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!