在Mac/OSX上进行Dart安装/设置

guy*_*uyd 6 dart

一个简单的问题:Dart编辑器+ SDK(解压缩下载后)安装/移动到(/ Applications或...)的常用文件夹是什么?

谢谢.

Yvg*_*gen 10

 请遵循https://www.dartlang.org/tools/sdk

$ brew tap dart-lang/dart
$ brew install dart
Run Code Online (Sandbox Code Playgroud)

然后:

$ brew info dart
Run Code Online (Sandbox Code Playgroud)

您将看到: /usr/local/opt/dart/libexec


小智 9

Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec

--with-dartium:
To use with IntelliJ, set the Dartium execute home to:
/usr/local/opt/dart/Chromium.app
Run Code Online (Sandbox Code Playgroud)

其他信息:https://www.dartlang.org/downloads/mac.html


小智 5

参考https://dart.dev/get-dart

$ brew tap dart-lang/dart
$ brew install dart
Run Code Online (Sandbox Code Playgroud)

安装完成后,然后

$ brew info dart
Run Code Online (Sandbox Code Playgroud)

这给出了结果

brew info dart
dart-lang/dart/dart: stable 2.7.0, devel 2.8.0-dev.2.0
The Dart SDK
https://www.dartlang.org/
/usr/local/Cellar/dart/2.7.0 (474 files, 463.4MB) *
  Built from source on 2020-01-15 at 16:53:13
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--devel
    Install development version 2.8.0-dev.2.0
==> Caveats
Please note the path to the Dart SDK:
  /usr/local/opt/dart/libexec
Run Code Online (Sandbox Code Playgroud)


Pau*_*nta 4

我建议你通过Homebrew安装 Dart 。Homebrew 是一款制作精良的软件,您可以使用它来安装许多您现在或将来可能需要的东西。而且使用起来很简单;要安装 dart,你所要做的就是

brew tap dart-lang/dart
brew install dart
Run Code Online (Sandbox Code Playgroud)

请注意,通常您只需执行brew install X部分操作,但 Dart 是一个特例