Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Multithreading Dart中的线程:无法导入包_Multithreading_Dart - Fatal编程技术网

Multithreading Dart中的线程:无法导入包

Multithreading Dart中的线程:无法导入包,multithreading,dart,Multithreading,Dart,机器:Linux(Ubuntu 17.04) 正在尝试执行此程序: 错误: Unhandled exception: Could not import "package:threading/threading.dart" from "file:///home/xxxxs/devel/dartprog/example_interleaved_execution.dart": Could not resolve a package location for base at file:///home

机器:Linux(Ubuntu 17.04)

正在尝试执行此程序:

错误:

Unhandled exception:
Could not import "package:threading/threading.dart" from "file:///home/xxxxs/devel/dartprog/example_interleaved_execution.dart": Could not resolve a package location for base at file:///home/xxxxs/devel/dartprog/example_interleaved_execution.dart
null:
已尝试:

Unhandled exception:
Could not import "package:threading/threading.dart" from "file:///home/xxxxs/devel/dartprog/example_interleaved_execution.dart": Could not resolve a package location for base at file:///home/xxxxs/devel/dartprog/example_interleaved_execution.dart
null:
  • 发布缓存修复
  • 已删除
    ~/.pub缓存
  • 重新启动计算机并尝试执行
    $dart示例\u交错\u执行。dart
    和相同错误
如何解决这个问题


注意:如果有人在代理后工作,请确保“pub”也在root下工作。)

您可能需要自己生成一个
pubspec.yaml
文件,配置如下:

名称:我的测试库
依赖项:
线程:^0.0.8
然后,您可以执行一个
pub-get
,它将安装所需的依赖项