编程技术网

关注微信公众号,定时推送前沿、专业、深度的编程技术资料。

 找回密码
 立即注册

QQ登录

只需一步,快速开始

极客时间

运行“酒吧全局激活DevTools”时错误:Error while running "pub global activate devtools"

作者: GermanBluefox 2022-5-12 16:16:33 显示全部楼层 |阅读模式

Error while running "pub global activate devtools"

在我的Android中 Boot 新的Flutter项目时,我的错误低于错误。我尝试与 Flutter 的医生一起,这没有任何问题。我还尝试更改Fultter SDK版本,但发生了同样的错误。这是从最近两天开始的,一切都很好。系统Windows 10

Error running pub global activate devtools: The getter 'source' was called on null. Receiver: null Tried calling: source dart:core Object.noSuchMethod package:pub/src/global_packages.dart 287:21 GlobalPackages._describeActive package:pub/src/global_packages.dart 179:7 GlobalPackages._installInCache package:pub/src/global_packages.dart 120:11 GlobalPackages.activateHosted package:pub/src/command/global_activate.dart 118:24 GlobalActivateCommand.runProtected dart:async new Future.sync package:pub/src/utils.dart 113:12 captureErrors.wrappedCallback dart:async runZonedGuarded package:pub/src/utils.dart 130:5 captureErrors package:pub/src/command.dart 164:13 PubCommand.run package:args/command_runner.dart 196:27 CommandRunner.runCommand package:pub/src/command_runner.dart 150:26 PubCommandRunner.runCommand package:pub/src/command_runner.dart 138:18 PubCommandRunner.run C:\b\s\w\ir\cache\builder\src\third_party\dart\third_party\pkg\pub\bin\pub.dart 9:48 main This is an unexpected error. Please run

dart pub --trace global activate devtools

and include the logs in an issue on https://github.com/dart-lang/pub/issues/new

该问题来自:dart-lang/pub/issues/3072 , 试试查看该项目更多issue.

问题解答

msva 2022-5-12 16:49:38 显示全部楼层

我们之前看到的这个错误。但是我们没有机会调试它。

您能否 showing 出:

$ cat ~/.pub_cache/global_packages/devtools/pubspec.lock

我觉得在Pub版本之间移动时,那里有些不变。

为了解决问题,您可以

$ pub global deactivate devtools
$ pub global activate devtools

And if that fails, try removing your .pub_cache:

$ mv ~/.pub_cache ~/.pub_cache_backup

and then trying again.

请向您的发现报告 - 我们必须解决此问题。

腾讯云服务器 阿里云服务器
关注微信
^