无法快速切换至Beta频道

时间:2020-06-25 14:43:48

标签: android android-studio flutter dart flutter-web

无法切换到抖动的Beta频道 C:\ Users \ vairo_drrrnuo \ IdeaProjects \ bridge> flutter频道beta

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.

2 个答案:

答案 0 :(得分:0)

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

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

此外,两个文件似乎都没有在git存储库中建立索引。因此,您现在有以下选择:

  1. 从项目文件夹切换到不相关的目录,然后尝试再次运行flutter channel beta(可能是最简单的解决方案)
  2. 如果不需要,请删除这两个文件(对于iOS,通常需要ios / Podfile进行编译)
  3. 将文件添加到git仓库中,运行git comit,然后再次运行

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

答案 1 :(得分:0)

转到flutter目录,然后打开终端,输入以下 git clean -xffd