我是Flutter的新手。当我添加新程序包并运行flutter packages get
时,出现以下错误:
Running "flutter packages get" in flutter_app...
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 341:7 BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 142:7 BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 167:12 BoundSource.getVersions
package:pub/src/solver/package_lister.dart 76:44 PackageLister._versions.<fn>.<fn>
dart:async runZoned
package:pub/src/http.dart 272:10 withDependencyType
package:pub/src/solver/package_lister.dart 75:33 PackageLister._versions.<fn>
===== asynchronous gap ===========================
dart:async new Future.sync
package:async/src/async_memoizer.dart 43:42 AsyncMemoizer.runOnce
package:pub/src/solver/package_lister.dart 74:58 PackageLister._versions
package:pub/src/solver/package_lister.dart 111:21 PackageLister.countVersions
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 354:44 VersionSolver._choosePackageVersion.<fn>
===== asynchronous gap ===========================
package:pub/src/utils.dart 301:39 minByAsync
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 350:25 VersionSolver._choosePackageVersion
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 97:22 VersionSolver.solve
===== asynchronous gap ===========================
package:pub/src/solver.dart 35:10 resolveVersions.<fn>
package:pub/src/log.dart 378:18 progress
package:pub/src/solver.dart 32:10 resolveVersions
package:pub/src/entrypoint.dart 200:24 Entrypoint.acquireDependencies
===== asynchronous gap ===========================
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 168:39 PubCommandRunner.runCommand.<fn>
dart:async new Future.sync
package:pub/src/utils.dart 109:12 captureErrors.<fn>
dart:async runZoned
package:pub/src/utils.dart 126:5 captureErrors
package:pub/src/command_runner.dart 168:13 PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 117:11 PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8:22 main
This is an unexpected error. Please run
pub --trace --verbosity=warning get --no-precompile
and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
pub get failed (1)
package:pub/src/command/get.dart 41:23 GetCommand.run
package:args/command_runner.dart 194:27 CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 168:39 PubCommandRunner.runCommand.<fn>
dart:async new Future.sync
package:pub/src/utils.dart 109:12 captureErrors.<fn>
dart:async runZoned
package:pub/src/utils.dart 126:5 captureErrors
package:pub/src/command_runner.dart 168:13 PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 117:11 PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8:22 main
This is an unexpected error. Please run
pub --trace --verbosity=warning get --no-precompile
and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
pub get failed (1)
我需要使用代理吗?谢谢您的帮助。
OS:Ubuntu 16.04 64位
颤振:0.6.0
Dart:2.1.0-dev.0.0.flutter-be6309690f
在android studio和vscode上都经过测试。