来源:未知 时间:2023-05-08 18:33 作者:小飞侠 阅读:次
[导读] 原创: https://blog.csdn.net/wjw465150?spm=1011.2415.3001.5343 Dart环境搭建 由于在国内访问Flutter有时可能会受到限制,Flutter官方为中国开发者搭建了临时镜像,大家可以将如下环境变量加入到用户环...
原创: https://blog.csdn.net/wjw465150?spm=1011.2415.3001.5343 Dart环境搭建由于在国内访问Flutter有时可能会受到限制,Flutter官方为中国开发者搭建了临时镜像,大家可以将如下环境变量加入到用户环境变量中: export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn Dart SDK 下载Dart SDK 主页: https://dart.dev/tools
学习 Dart 语言, 最好是选择第三种类型的SDK了, Windows 下 Dart SDK安装使用 Chocolatey 安装, 下面是安装最新稳定版本的命令 使用社区提供的 installer 安装, 这是一个在线安装程序 Linux 下 Dart SDK安装直接下载压缩包的方式,地下载址:https://dart.cn/tools/sdk/archive 解压:unzip ./dartsdk-linux-x64-release.zip -d /opt 环境变量: /etc/profile #Dart SDK export PATH=/opt/dart-sdk/bin:$PATH export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn Redhat 问题/lib64/libc.so.6: version `GLIBC_2.1X' not found
[van@localhost app_keymng]$ strings /lib64/libc.so.6 |grep GLIBC GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 GLIBC_PRIVATE1234567891011121314151617 到GUN官网ftp找到你缺少的版本http://ftp.gnu.org/gnu/glibc mkdir -p /opt/tempcd /opt/tempwget http://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gztar -zxvf glibc-2.17.tar.gzcd glibc-2.17mkdir buildcd build../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/binmake -j 8make installstrings /lib64/libc.so.6 | grep GLIBC Mac安装Dart SDK使用Homebrew安装,执行以下:$ brew tap dart-lang/dart $ brew install dart 结果: $ brew tap dart-lang/dart Updating Homebrew...==> Auto-updated Homebrew!Updated 2 taps (homebrew/core and homebrew/cask).==> New Formulae faudio phpstan vapoursynth-imwri vapoursynth-sub kahip terrahub vapoursynth-ocr==> Updated Formulae amazon-ecs-cli imagemagick operator-sdk arangodb jenkins pbrt asciidoctor jetty php-cs-fixer autojump kibana@5.6 pilosa autopep8 lastpass-cli prometheus bdw-gc libmicrohttpd pulumi bit libpng pushpin btfs libpulsar rawtoaces ctl libssh rclone cython libtorrent-rasterbar ripgrep digdag libvmaf root erlang maven s-nail field3d memcached ship fluxctl n skaffold glfw nano swiftformat glib nats-streaming-server synfig goaccess nginx telegraf gradle nomad tomcat graphene ocamlbuild topgrade hadoop opencv triton helmfile opencv@2 vapoursynth hexyl opencv@3 vault hugo openexr vips iamy openimageio xonsh ilmbase openvdb youtube-dl==> Deleted Formulae safe==> Tapping dart-lang/dart Cloning into '/usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart'... remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (7/7), done. remote: Total 7 (delta 1), reused 3 (delta 0), pack-reused 0Unpacking objects: 100% (7/7), done. Tapped 3 formulae (35 files, 33.1KB).# moka @ bogon in ~ [15:16:27] $ brew install dart==> Installing dart from dart-lang/dart==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/rele######################################################################## 100.0%==> Caveats Please note the path to the Dart SDK: /usr/local/opt/dart/libexec==> Summary /usr/local/Cellar/dart/2.2.0: 340 files, 281.4MB, built in 54 seconds Dart安装路径:/usr/local/opt/dart/libexec
$ brew info dart dart-lang/dart/dart: stable 2.2.0, devel 2.2.1-dev.4.2 The Dart SDK https://www.dartlang.org/ /usr/local/Cellar/dart/2.2.0 (340 files, 281.4MB) * Built from source on 2019-04-17 at 15:17:46 From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb==> Options --devel Install development version 2.2.1-dev.4.2==> Caveats Please note the path to the Dart SDK: /usr/local/opt/dart/libexec 离线安装:墙内请替换域名 storage.flutter-io.cn 解压到磁盘。磁盘位置 ~/Documents/dart-sdk 设置环境变量 # 打开配置文件 vim ~/.bash_profile # 尾部加入配置 export PATH=~/Documents/dart-sdk/bin:$PATH # 重载配置文件 source ~/.bash_profile Dart编译成本机可执行程序
IDE 开发环境
使用 dart pub 包管理器安装第三方包pub 包管理器和flutter storage的国内镜像设置参考: https://blog.csdn.net/u7Ckm/article/details/83552177 和 https://www.jianshu.com/p/31e5800e18d9 VSCode dart 插件在创建dart project时候, 需要依赖 stagehand 这个包, 如果在VSCode 自动安装该依赖包报错, 基本都是因为访问pub repository 网站网络不太通畅, 可以通过参考上面的博客, 启用国内镜像, 然后再通过命令行自行安装 stagehand 包. pub global activate stagehand pub global activate webdev 添加path: Warning: Pub installs executables into %USERPROFILE%\AppData\Local\Pub\Cache\bin, which is not on your path. You can fix that by adding that directory to your system's "Path" environment variable. %USERPROFILE%\AppData\Local\Pub\Cache\bin dart 语言教程dart 编程风格推荐http://dart.goodev.org/guides/language/effective-dart Dart 语言之旅教程https://dart.dev/guides/language/language-tour Flutter基础篇(2)-- 老司机用一篇博客带你快速熟悉Dart语法https://www.jianshu.com/p/3d927a7bf020 Dart学习之方法函数https://blog.csdn.net/lyh1299259684/article/details/80565419 Dart vs Swifthttps://juejin.im/post/5c506a7c51882525c71333d2 Dart Server开发环境搭建及新建运行项目https://blog.csdn.net/jay100500/article/details/88564129 flutter 相关基于 Flutter 开发 iOS 与 Android 移动应用前的准备https://ninghao.net/blog/6375 https://flutterchina.club/setup-windows/ 唠唠使用 Flutter 开发移动应用的体验视频教程-iOS 与 Android 平台移动应用开发https://ninghao.net/package/flutter |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com