【问题标题】:'Flutter/Flutter.h' file not found webview_flutter-1.0.7找不到“Flutter/Flutter.h”文件 webview_flutter-1.0.7
【发布时间】:2021-04-07 02:58:26
【问题描述】:

请帮帮我!我不知道那是什么问题,但我认为是因为我更新到最新版本的颤振。 我试过了,flutter clean,rm podfile,还有更多!!但我无法解决这个问题,是颤振的问题吗? 我有两天尝试修复它,但我没有成功。

*我更新了我所有的豆荚,我都做了!但我不能做那个工作..(颤抖医生没关系) 我的颤振版本是 **我也在稳定的频道中尝试过,但没有成功。

Flutter 1.26.0-2.0.pre.157 • channel master • https://github.com/flutter/flutter.git
Framework • revision 4b83be6c23 (9 hours ago) • 2020-12-30 02:09:03 -0500
Engine • revision 0e5a25d779
Tools • Dart 2.12.0 (build 2.12.0-179.0.dev)

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    In file included from /Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.m:5:
    /Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

【问题讨论】:

  • 尝试“flutter clean”,然后尝试“flutter channel stable”(或 dev)。如果这不起作用,那么您应该尝试“webview_flutter-1.0.6”

标签: flutter


【解决方案1】:

我遇到了同样的问题并通过以下步骤解决了它:

  1. 转到此目录/Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org

  2. 删除webview_flutter-1.0.7文件夹

  3. 然后在项目文件夹中运行以下命令。

    flutter pub get

如果这不起作用,请尝试使用较低版本,例如 1.0.6

【讨论】:

  • 谢谢mir Rahed,但是我可以看到两次相同的依赖关系,我删除了那个,但是项目有越来越多相同的问题,这很奇怪,因为以前没有发生过跨度>
  • @VictorLagunas 欢迎您,我回答了您的问题。 Mir 只建议我批准的编辑。你试过低版本吗?
  • 非常感谢大家,我有一个解决方案,我不知道为什么会发生这种情况,但我的所有项目都有相同的错误......所以我需要删除 iOS文件夹(创建 iOS/Runner 的备份)之后,写入 'flutter create . '。
猜你喜欢
  • 2021-09-01
  • 2021-08-27
  • 2021-09-04
  • 1970-01-01
  • 2021-11-18
  • 2021-07-21
  • 2021-03-26
  • 2021-11-20
  • 1970-01-01
相关资源
最近更新 更多