首页 > 解决方案 > 找不到“Flutter/Flutter.h”文件 webview_flutter-1.0.7

问题描述

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

*我更新了我所有的 Pod,我做了所有的工作!,但我无法完成这项工作..(颤振医生没问题)我的颤振版本是 **我也在稳定的频道中尝试过,但没有奏效。

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

解决方案


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

  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


推荐阅读