flutter doctor -v [✓] Flutter (Channel stable, 2.10.5, on macOS 12.4 21F79 darwin-x64, locale zh-Hans-CN) • Flutter version 2.10.5 at /Users/guanguan/Applications/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5464c5bac7 (4 周前), 2022-04-18 09:55:37 -0700 • Engine revision 57d3bac3dd • Dart version 2.16.2 • DevTools version 2.9.2 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/guanguan/Library/Android/sdk • Platform android-31, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.10.1
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.67.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.40.0
[✓] Connected device (2 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator) • Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.64
[!] HTTP Host Availability ✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out
Upgrading Flutter to 3.0.0 from 2.10.5 in /Users/guanguan/Applications/flutter... Downloading Darwin x64 Dart SDK from Flutter engine d1b9a6938ad77326ac3a94d92bbc77933ed829ed... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.0.0, on macOS 12.4 21F79 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 13.4) ! CocoaPods 1.10.1 out of date (1.11.0 is recommended). 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 upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1) [✓] VS Code (version 1.67.1) [✓] Connected device (3 available) [✓] HTTP Host Availability ! Doctor found issues in 1 category.
sudo gem install cocoapods Password: Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0 Fetching addressable-2.8.0.gem Fetching cocoapods-core-1.11.3.gem Fetching molinillo-0.8.0.gem Fetching rexml-3.2.5.gem Fetching xcodeproj-1.21.0.gem Fetching cocoapods-1.11.3.gem Successfully installed addressable-2.8.0 Successfully installed cocoapods-core-1.11.3 Successfully installed molinillo-0.8.0 Successfully installed rexml-3.2.5 Successfully installed xcodeproj-1.21.0 Successfully installed cocoapods-1.11.3 Parsing documentation for addressable-2.8.0 Installing ri documentation for addressable-2.8.0 Parsing documentation for cocoapods-core-1.11.3 Installing ri documentation for cocoapods-core-1.11.3 Parsing documentation for molinillo-0.8.0 Installing ri documentation for molinillo-0.8.0 Parsing documentation for rexml-3.2.5 Installing ri documentation for rexml-3.2.5 Parsing documentation for xcodeproj-1.21.0 Installing ri documentation for xcodeproj-1.21.0 Parsing documentation for cocoapods-1.11.3 Installing ri documentation for cocoapods-1.11.3 Done installing documentation for addressable, cocoapods-core, molinillo, rexml, xcodeproj, cocoapods after 5 seconds 6 gems installed
flutter doctor -v [✓] Flutter (Channel stable, 3.0.0, on macOS 12.4 21F79 darwin-x64, locale zh-Hans-CN) • Flutter version 3.0.0 at /Users/guanguan/Applications/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ee4e09cce0 (9 天前), 2022-05-09 16:45:18 -0700 • Engine revision d1b9a6938a • Dart version 2.17.0 • DevTools version 2.12.2 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/guanguan/Library/Android/sdk • Platform android-31, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.67.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.40.0
Running "flutter pub get"in app... Launching lib/main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/cached_network_image_provider.dart:109:29: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null. - 'PaintingBinding'is from 'package:flutter/src/painting/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/painting/binding.dart'). () => PaintingBinding.instance?.imageCache?.evict(key), ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/custom_layout.dart:32:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_getSize); ^ lib/widget/animation_cart.dart:39:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback((_) { ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/transformer_page_view/transformer_page_view.dart:516:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_onGetSize); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/transformer_page_view/transformer_page_view.dart:533:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_onGetSize); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_state_manager/src/rx_flutter/rx_disposable.dart:20:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance?.addPostFrameCallback((_) => onReady()); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_state_manager/src/rx_flutter/rx_notifier.dart:130:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance?.addPostFrameCallback((_) => onReady()); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_state_manager/src/simple/get_controllers.dart:90:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addObserver(this); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_state_manager/src/simple/get_controllers.dart:96:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.removeObserver(this); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/extension_navigation.dart:357:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance!.addPostFrameCallback((_) { ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/extension_navigation.dart:468:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance!.addPostFrameCallback((_) { ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/snackbar/snackbar.dart:452:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null. - 'SchedulerBinding'is from 'package:flutter/src/scheduler/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart'). SchedulerBinding.instance!.addPostFrameCallback( ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/router_report.dart:53:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding'is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback((_) { ^
根据官方推荐dart fix --apply,运行程序,报错信息只剩下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Performing hot reload... Syncing files to device Android SDK built for x86... ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/custom_layout.dart:32:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_getSize); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/transformer_page_view/transformer_page_view.dart:516:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_onGetSize); ^ ../../../Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_swiper_plus-2.0.4/lib/src/transformer_page_view/transformer_page_view.dart:533:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../Applications/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(_onGetSize); ^ Reloaded 9 of 1563 libraries in 796ms.