Flutter Environmental Installation

2023-10-31 07:30

本文主要是介绍Flutter Environmental Installation,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Install


Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your teamicon-default.png?t=N7T8https://www.notion.so/serious-lose/Flutter-Environmental-Installation-ead2ea1520ba4129bda14372694b9d7e?pvs=4

// 安装dart
brew install dart
✘ @HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)✗ cmdline-tools component is missingRun `path/to/sdkmanager --install "cmdline-tools;latest"`See <https://developer.android.com/studio/command-line> for more details.✗ Android license status unknown.Run `flutter doctor --android-licenses` to accept the SDK licenses.See <https://flutter.dev/docs/get-started/install/macos#android-setup> for more details.
[!] Xcode - develop for iOS and macOS (Xcode 15.0.1)✗ Unable to get list of installed Simulator runtimes.✗ CocoaPods not installed.CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.Without CocoaPods, plugins will not work on iOS or macOS.For more info, see <https://flutter.dev/platform-plugins>To install see <https://guides.cocoapods.org/using/getting-started.html#installation> for instructions.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)

Android Studio (not installed)

  • 安装android Studio即可
  • 下载地址 Android & iOS - Android Studio/Xcode历史版本下载(持续更新)_xcode 历史版本_crasowas的博客-CSDN博客
@HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)✗ cmdline-tools component is missingRun `path/to/sdkmanager --install "cmdline-tools;latest"`See <https://developer.android.com/studio/command-line> for more details.✗ Android license status unknown.Run `flutter doctor --android-licenses` to accept the SDK licenses.See <https://flutter.dev/docs/get-started/install/macos#android-setup> for more details.
[!] Xcode - develop for iOS and macOS (Xcode 15.0.1)✗ Unable to get list of installed Simulator runtimes.✗ CocoaPods installed but not working.You appear to have CocoaPods installed but it is not working.This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.This can usually be fixed by re-installing CocoaPods.To re-install see <https://guides.cocoapods.org/using/getting-started.html#installation> for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)
[✓] Network resources

Xcode - develop for iOS and macOS (Xcode 15.0.1)

  • 更新Xcode

CocoaPods not installed

// 查看是否安装
gem list
*** LOCAL GEMS ***
...
cocoapods (1.14.2)
cocoapods-core (1.14.2, 1.13.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.0, 1.6.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)
colored2 (3.1.2)
...
// 卸载 cocoapods
sudo gem uninstall cocoapods// 重新安装
sudo gem install -n /usr/local/bin cocoapods
  • 如果之前已经安装可以安装不成功
// 更新Homebrew
brew update// 更新最新版本Homebrew
brew update-reset// 更新Homebrew的package
brew upgrade// 清除Homebrew缓存
brew cleanup// 安装ruby
brew install ruby// 查看可清理的旧版本,不执行实际操作
brew cleanup -n// 清除ruby 旧版本
brew cleanup ruby// 安装过后查看ruby版本未改变
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
@HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)✗ cmdline-tools component is missingRun `path/to/sdkmanager --install "cmdline-tools;latest"`See <https://developer.android.com/studio/command-line> for more details.✗ Android license status unknown.Run `flutter doctor --android-licenses` to accept the SDK licenses.See <https://flutter.dev/docs/get-started/install/macos#android-setup> for more details.
[!] Xcode - develop for iOS and macOS (Xcode 15.0.1)✗ Unable to get list of installed Simulator runtimes.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)
[✓] Network resources

Unable to get list of installed Simulator runtimes.

  • Xcode中启动下载ios设备
@HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)✗ cmdline-tools component is missingRun `path/to/sdkmanager --install "cmdline-tools;latest"`See <https://developer.android.com/studio/command-line> for more details.✗ Android license status unknown.Run `flutter doctor --android-licenses` to accept the SDK licenses.See <https://flutter.dev/docs/get-started/install/macos#android-setup> for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (3 available)
[✓] Network resources

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See macOS install | Flutter for more details.

  • 在android studio 中选则 Android SDK → SDK Tooks → 安装 Android SDK Command-line Tools(latest)
@HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3To update the Android SDK visit <https://flutter.dev/docs/get-started/install/macos#android-setup> for detailed instructions.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)
[✓] Network resources! Doctor found issues in 1 category.

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ Flutter requires Android SDK 29 and the Android BuildTools 28.0.3 To update the Android SDK visit macOS install | Flutter for detailed instructions.

  • Android Studio -> SDK Manager -> SDK Platforms tab -> 选择 Android 10.0 Pie(SDK 29 对应的是10版本,可能是更高的版本,注意提示要求版本) 下载并安装

  • Android Studio -> SDK Manager -> SDK Tools tab -> 选择右下角 Show Package Details -> 在 Android SDK Build-Tools 里选择 28.0.3 下载并安装

    Untitled

@HLFdeMacBook-Pro  ~  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)
[✓] Network resources

这篇关于Flutter Environmental Installation的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/313762

相关文章

Flutter 进阶:绘制加载动画

绘制加载动画:由小圆组成的大圆 1. 定义 LoadingScreen 类2. 实现 _LoadingScreenState 类3. 定义 LoadingPainter 类4. 总结 实现加载动画 我们需要定义两个类:LoadingScreen 和 LoadingPainter。LoadingScreen 负责控制动画的状态,而 LoadingPainter 则负责绘制动画。

Flutter Button使用

Material 组件库中有多种按钮组件如ElevatedButton、TextButton、OutlineButton等,它们的父类是于ButtonStyleButton。         基本的按钮特点:         1.按下时都会有“水波文动画”。         2.onPressed属性设置点击回调,如果不提供该回调则按钮会处于禁用状态,禁用状态不响应用户点击。

flutter开发实战-flutter build web微信无法识别二维码及小程序码问题

flutter开发实战-flutter build web微信无法识别二维码及小程序码问题 GitHub Pages是一个直接从GitHub存储库托管的静态站点服务,‌它允许用户通过简单的配置,‌将个人的代码项目转化为一个可以在线访问的网站。‌这里使用flutter build web来构建web发布到GitHub Pages。 最近通过flutter build web,通过发布到GitHu

Flutter 中的低功耗蓝牙概述

随着智能设备数量的增加,控制这些设备的需求也在增加。对于多种使用情况,期望设备在需要进行控制的同时连接到互联网会受到很大限制,因此是不可行的。在这些情况下,使用低功耗蓝牙(也称为 Bluetooth LE 或 BLE)似乎是最佳选择,因为它功耗低,在我们的手机中无处不在,而且无需连接到更广泛的网络。因此,蓝牙应用程序的需求也在不断增长。 通过阅读本文,您将了解如何开始在 Flutter 中开

flutter开发多端平台应用的探索 下 (跨模块、跨语言通信之平台通道)

前文 Flutter 是一个跨平台的开发框架,它允许开发者使用相同的代码库来构建 iOS、Android、Web 和桌面应用程序。 上文flutter开发多端平台应用的探索 上(基本操作)-CSDN博客列举了一些特定平台的case(桌面端菜单,鼠标快捷键)的使用方法,有些是flutter提供了对应能力,只需要学习如何调API,有些事三方库支持,本文要探讨的平台通道是更为强大的工具,很多三方插件

Flutter-使用dio插件请求网络(get ,post,下载文件)

引入库:dio: ^2.1.13可直接运行的代码:包含了post,get 下载文件import 'package:flutter/material.dart';import 'package:dio/dio.dart';void main() {runApp(new MaterialApp(title: 'Container demo',home: new visitNetPage(),)

Flutter-选择附件,图片,视频。file_picker

仅供参考: 引入插件: file_picker: ^1.3.8 按照返回值,分了三组: // Single file path String filePath;第一组:返回文件地址 //选择任何文件 filePath = await FilePicker.getFilePath(type: FileType.ANY); // will let you pick one file path, fr

Flutter-图表显示charts_flutter

引入插件: charts_flutter: ^0.4.0 ChartFlutterBean import 'package:charts_flutter/flutter.dart';import 'package:myself_project/OrdinalSales%20.dart';class ChartFlutterBean {static List<Series<TimeSer

Flutter-常用插件汇总

audio_recorder: any #录音、播放flutter_sound: ^1.1.5#录音dropdown_menu: ^1.1.0#下拉菜单simple_permissions:#权限获取easy_alert:#弹框amap_location: any #高德地图location: any #gogle位置获取barcode_scan 0.0.8#二维码识别qr_mobile_vi