无法在 flutter 中切换到 beta 频道

Not able to switch to beta channel in flutter

无法切换到 flutter beta 频道 C:\Users\vairo_drrrnuo\IdeaProjects\bridge>flutter 频道测试版

Switching to flutter channel 'beta'...
git: From https://github.com/flutter/flutter
git:    f994b7697..9b9b543d9  beta                   -> origin/beta
git:  + cb8832388...7cd39d661 dds_integration_take_2 -> origin/dds_integration_take_2  (forced update)
git:    15a28159b..c68758fab  master                 -> origin/master
git:  * [new tag]             1.19.0-4.2.pre         -> 1.19.0-4.2.pre
git: error: The following untracked working tree files would be overwritten by checkout:
git:    examples/flutter_view/ios/Podfile
git:    packages/flutter_tools/lib/src/base/platform.dart
git: Please move or remove them before you switch branches.
git: Aborting
Switching channels failed with error code 1.

您项目的两个文件似乎已更改,导致更改频道时出现问题:

  • examples/flutter_view/ios/Podfile
  • packages/flutter_tools/lib/src/base/platform.飞镖

此外,这两个文件似乎都没有在 git 存储库中编入索引。所以你现在有以下选择:

  1. 将项目文件夹更改为不相关的目录,然后再次尝试 运行ning flutter channel beta(可能是最简单的解决方案)
  2. 如果不需要这两个文件,请删除它们(ios/Podfile通常需要为iOS编译)
  3. 将文件添加到您的 git 存储库,运行 git comit 并再次 运行

www.DeepL.com/Translator 翻译(免费版)

转到 flutter 目录,然后打开终端键入此 git clean -xffd