由于出现一些git消息,因此无法更改为颤动通道主控器

时间:2019-01-27 19:38:01

标签: git flutter

Switching to flutter channel 'master'... 
git: error: Your local changes to the following files would be overwritten by 
checkout:
git:    packages/flutter/lib/src/material/scaffold.dart
git: Please commit your changes or stash them before you switch branches.
git: Aborting
Switching channels failed with error code 1.

当我尝试使用命令flutter channel master更改为频道主频道时出现此错误。

flutter doctor

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Versión 
10.0.17134.523], locale es-EC)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.0)
[√] VS Code, 64-bit edition (version 1.30.2)
[√] Connected device (1 available)

1 个答案:

答案 0 :(得分:0)

刚刚问了一个very similar question。我将仅显示在您的特定情况下该怎么做,但除此之外,我认为这应该关闭。

如果Flutter SDK目录为F:/data/flutter,则只需删除以下文件,然后再次运行flutter upgrade

F:/data/flutter/packages/flutter/lib/src/material/scaffold.dart