gpt4 book ai didi

flutter - 错误 : Member not found: 'PlatformInterface verify' Flutter. 使用我现在运行良好的旧项目后出现此错误

转载 作者:行者123 更新时间:2023-12-05 08:10:43 28 4
gpt4 key购买 nike

以下是我将 flutter 版本从 2.0.1 更新到 2.8.2(pre) 后出现的错误。

我已经尝试过“flutter pub cache repair”、flutter clean 和 flutter pub get,它并没有解决我的问题。

即使我尝试更新 gradle 相同(没有成功)

错误

../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-2.0.5/lib/url_launcher_platform_interface.dart:37:23: Error: Member not found: 'PlatformInterface.verify'.
PlatformInterface.verify(instance, _token);
^^^^^^
../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-5.0.1/lib/video_player_platform_interface.dart:35:23: Error: Member not found: 'PlatformInterface.verify'.
PlatformInterface.verify(instance, _token);
^^^^^^
../../snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_platform_interface-1.8.1/lib/src/platform_interface/webview_cookie_manager.dart:33:23: Error: Member not found: 'PlatformInterface.verify'.
PlatformInterface.verify(instance, _token);
^^^^^^
2 FAILURE: Build failed with an exception.

* Where:
Script '/home/enbake/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1070

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/enbake/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1

flutter 医生

[✓] Flutter (Channel stable, 2.8.2-0.0.pre.1, on Ubuntu 20.04.2 LTS 5.11.0-46-generic, locale en_GB.UTF-8)
• Flutter version 2.8.2-0.0.pre.1 at /home/enbake/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d993220b44 (3 weeks ago), 2021-12-27 17:52:48 +0530
• Engine revision 890a5fca2e
• Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /home/enbake/Android/Sdk
• Platform android-31, build-tools 32.0.0
• ANDROID_HOME = /usr/lib/android-sdk/
• Java binary at: /home/enbake/software/android-studio-2020.3.1.26-linux/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Android Studio (version 2020.3)
• Android Studio at /home/enbake/Downloads/flutter_theme/android-studio-2020.3.1.26-linux/android-studio
• Flutter plugin version 63.0.1
• Dart plugin version 203.8452
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] Android Studio
• Android Studio at /home/enbake/software/android-studio-2020.3.1.26-linux/android-studio
• 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
• android-studio-dir = /home/enbake/software/android-studio-2020.3.1.26-linux/android-studio
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.57.0)
• VS Code at /usr/share/code
• Flutter extension version 3.25.0

[✓] Connected device (2 available)
• Redmi Note 8 (mobile) • 945507b9 • android-arm64 • Android 11 (API 30)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.106

• No issues found!

谢谢你的帮助

最佳答案

正如我在 flutter 官方 github 问题上问过同样的问题,他们建议更新插件,因为它不依赖于 flutter 本身。
Issue on flutter official github issues

所以我更新了插件还是没有解决。

然后我在更新插件后使用了这个命令

flutter pub upgrade --major-versions

在这个神奇的命令之后并手动更新插件解决了我的问题。

注意:这个过程可能需要时间和大量数据,在我的例子中这个过程下载了大量数据,我记得它是 gradle 的东西......

关于flutter - 错误 : Member not found: 'PlatformInterface verify' Flutter. 使用我现在运行良好的旧项目后出现此错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70765865/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com