【发布时间】:2021-12-18 09:52:56
【问题描述】:
从 2.5 升级到 Flutter 2.8 后出现此错误,运行 flutter clean 但无法解决
../../flutter/.pub-cache/hosted/pub.dartlang.org/visibility_detector-0.2.0/lib/src/visibility_detector_layer.dart:276:21:错误:位置参数太多:允许1个,但是2 找到。
尝试删除额外的位置参数。
super.addToScene(builder, layerOffset);
扑医生
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.5.2 20G95 darwin-arm, locale en-KE)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 13.2)
✗ 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 (Cannot find Chrome executable at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio
✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Community Edition (version 2021.3)
[✓] VS Code (version 1.63.0)
[✓] Connected device (1 available)
! Doctor found issues in 3 categories.
颤振版本
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (2 days ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
代码在 2.5 上运行良好,直到升级
【问题讨论】:
-
试用0.2.2版
-
它也不适用于 visibility_detector-0.2.2