gpt4 book ai didi

Flutter upgrade error: Unknown flutter tag(颤振升级错误:未知颤振标签)

转载 作者:bug小助手 更新时间:2023-10-22 16:57:01 34 4
gpt4 key购买 nike



~ flutter upgrade
Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is
recommended to use git directly if not working on an official channel.

~颤动升级未知的颤动标签。放弃升级以避免破坏本地更改。如果不在官方渠道上工作,建议直接使用git。


i try to upgrade my flutter sdk to latest version stable "flutter_macos_3.13.1-stable", but i have error message : "Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is
recommended to use git directly if not working on an official channel." Instead a successfully message .

我试图将我的flutter sdk升级到最新版本稳定的“flutter_macos_3.13.1-stable”,但我收到了错误消息:“未知的flutter标签。放弃升级以避免破坏本地更改。如果不在官方频道上工作,建议直接使用git。”而不是一条成功的消息。


更多回答

flutter upgrade --force force update

颤振升级——力的更新

I fixed. I tried to upgrade in android Studio and its worked.

我修复了。我尝试在android Studio中升级,结果成功了。

See github.com/flutter/flutter/issues/133441

请访问github.com/flutter/flutter/issues/133441

@VedantK we want the update and not the installation but thanks anyway

@VedantK我们想要更新而不是安装,但无论如何都要感谢

It happens if you run flutter upgrade from the wrong directory instead of flutter install directory

如果从错误的目录而不是flutter安装目录运行flutter升级,就会发生这种情况

优秀答案推荐

Run flutter upgrade from the flutter install directory. It works fine without the need to use --force or -f tags.

从flutter安装目录运行flutter升级。它工作得很好,不需要使用--force或-f标记。


flutter upgrade -v for more verbose output.

flutter升级-v以获得更详细的输出。



Just run flutter upgrade --force

只需运行颤振升级--强制



I found that running a Flutter upgrade inside the install directory worked for me...

我发现在安装目录中运行Flutter升级对我有效。。。


flutter doctor -v

gives the version, channel and install location:

给出了版本、通道和安装位置:


flutter doctor -v

Output:

输出:


[✓] Flutter (Channel stable, 3.13.0, on Ubuntu 22.04.3 LTS 6.2.0-26-generic, locale en_GB.UTF-8)
• **Flutter version 3.13.0 on channel stable at /home/mark/snap/flutter/common/flutter**


Running flutter upgrade from the Flutter install directory worked in my case (version 3.13.0 to version 3.13.3).

在我的案例中,从flutter安装目录运行flutter升级(版本3.13.0到版本3.13.3)是有效的。



Check your working directory.

请检查您的工作目录。


If you try and run the command "flutter upgrade", not from within the flutter install directory. I find you get this error. I was in my code directory and failed... I changed back to my main Flutter install directory and all "flutter upgrade" command worked fine.

如果您尝试运行命令“flutter upgrade”,而不是从flutter安装目录中运行。我发现你犯了这个错误。我在我的代码目录中,但失败了。。。我改回了Flutter的主安装目录,所有的“Flutter升级”命令都运行良好。


error: Unknown flutter tag. Abandoning upgrade to avoid destroying local changes. It is recommended to use git directly if not working on an official channel.

错误:未知的颤动标记。放弃升级以避免破坏本地更改。如果不在官方渠道上工作,建议直接使用git。



I had the same problem when I tried to run the command in my project directory. The solution was to run the command flutter upgrade in the directory where the Flutter SDK is located (e.g. /path-to-flutter-sdk/bin/flutter).

当我试图在我的项目目录中运行该命令时,我也遇到了同样的问题。解决方案是在flutter SDK所在的目录中运行flutter升级命令(例如/path to flutter SDK/bin/flutter)。



Use the force command or clone the flutter official repository. I think it is a temporary situation. Also after upgrading to 3.13 with the force command, we can update hotfix updates without using force. This is weird

使用force命令或克隆flutter官方存储库。我认为这只是暂时的情况。同样,在使用force命令升级到3.13之后,我们可以在不使用force的情况下更新修补程序更新。这很奇怪



just type cd then drag the flutter/bin folder which hold your flutter SDK. then flutter upgrade, no need to use --f or --force.

只需键入cd,然后拖动保存flutter SDK的flutter/bin文件夹。然后flutter升级,不需要使用-f或-force。


When you force upgrade from outside flutter sdk folder. You cannot downgrade to previous flutter version directly by terminal anymore

当您从flutter sdk文件夹外部强制升级时。您不能再通过终端直接降级到以前的flutter版本



I got this problem because somehow my flutter repository is outdated. So I have to git pull and then flutter upgrade works again:

我遇到这个问题是因为我的flutter存储库已经过时了。所以我不得不git pull,然后flutter升级再次生效:


$ cd ~/flutter
$ git status
On branch stable
Your branch is behind 'origin/stable' by 12 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)

$ git pull
...
$ flutter upgrade
(now it works)

Note: to find out where your flutter lives in, run flutter doctor -v and looking for 'Flutter version 3.13.6 on channel stable at'.

注意:要了解您的颤振的位置,请运行颤振医生-v并查找“flutter版本3.13.6,通道稳定在”。



It also occurred in my case, I solved it using below command:

它也发生在我的情况下,我使用以下命令解决了它:


flutter upgrade -f

or


flutter upgrade --force

Both are same

两者相同



Run Following command

运行以下命令


flutter upgrade --force

颤振升级力



Save your changes of your current project, stash or commit and push to a git repo then just use:

保存您对当前项目的更改,隐藏或提交并推送到git repo,然后只需使用:


flutter upgrade --force

更多回答

This worked. What may be the reason that it works from inside the install directory and not from any other directory?

这起到了作用。它在安装目录中工作,而不是在任何其他目录中工作的原因是什么?

There was an issue in the code itself, which is now fixed. But you'll still need to do the same to get the next hotfix release, which includes the fix for this issue.

代码本身存在问题,现已修复。但是,您仍然需要执行同样的操作才能获得下一个修补程序版本,其中包括此问题的修复程序。

This should be selected answer

这应该是选择答案

This is the right answer from all of them ! Thanks @NirmalCode !

这是他们所有人的正确答案!谢谢@NirmalCode!

nice and clean. Thanks!

漂亮干净。谢谢

is it not dangerous ?

这不危险吗?

Blindly applying that mentality to everything is dangerous, yes... But sometimes it's necessary to just make things work.

盲目地将这种心态应用于任何事情都是危险的,是的。。。但有时,让事情运转起来是必要的。

With big power comes big responsibility bro..

有了大权力就有了大责任兄弟。。

Its both "true" and "false" . False, because some packages may requires some specific versions. True because its okay if there is no need to specific version with no installed package.

它既有“真”也有“假”。False,因为某些软件包可能需要一些特定的版本。是的,因为如果不需要没有安装软件包的特定版本,这是可以的。

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com