Flutter3.x get-cli中运行get init初始化项目报错如何处理

发布于 1周前 作者 itying888 最后一次编辑是 5天前 来自 分享

Flutter get-cli中运行get init初始化项目会提示如下错误

get init
s E:\flutter\flutter study\tempstudy\misapp01> get init
1)Getx Pattern (by Kauê)
2)CLEAN (by Arktekko)
which architecture do you want to use? [1] unhandled exception:
Synchromus waiting using dart:cli waitfor and c Ap art aitforEvent is deprecated am disabled by defaut, this featwre will be fully remwed in art 34 release. you can aurently still enable
--enable deprecated wait for to the Dart vm, see https://dartbug.com/52121.
C: \Users \Administrator AppDatalLocal\Pub\cache hosted pub,flutter-io.cniget cli-1.8.4\binget.dart 18:23 main
package:dcli/src/util/wait for ex.dart 35:28
package:dcli/src/functions/echo.dart 34:5
package:dcli/src/functions/echo.dart 24:13
....
dart:isolate-patch/isolate patch.dart 295:33
dart:isolate-patch/isolate patch.dart 184:12

01.png

get init初始化错误的解决办法:

终端输入:

dart pub global deactivate get_cli

dart pub global activate -s git https://github.com/knottx/get_cli.git --git-ref knottx

上面下载失败也的话参考下面命令

dart pub global deactivate get_cli

flutter pub global activate -s git https://github.com/jonataslaw/get_cli

详情参考https://github.com/jonataslaw/get_cli/issues/243

回到顶部