flutter - Flutter webview_flutter 构建失败
问题描述
我正在尝试安装 webview_flutter 插件,但不知何故我的构建每次都失败
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 10.2s
└─Compiling, linking and signing... 2.1s
Xcode build done.
17.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
<path_to_project>ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal
error: module 'webview_flutter' not found
@import webview_flutter;
~~~~~~~^~~~~~~~~~~~~~~
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 11 Pro.
发布规范.yml
dependencies:
flutter:
sdk: flutter
webview_flutter: ^0.3.19+8
我尝试运行但它没有解决它。
flutter clean
flutter pub cache repair
解决方案
就我而言,问题是我手动编辑了 podfile 以将我自己的(非颤振)pod 添加到项目中。但是,flutter 构建不会尝试编辑(或覆盖)podfile,(也许这很好)所以 podfile 不会有支持 webview_flutter 所需的更改。我通过创建一个全新的颤振项目并将新项目生成的 podfile 与我当前的版本进行比较来解决这一切。他们看起来明显不同。
推荐阅读
- java - Tomcat 服务器之间的安全通信
- javascript - 如何降低此函数的对数成本
- kubernetes - 如何创建额外的 istio 入口网关?
- reactjs - 将基于类的组件更改为功能
- javascript - 如何从 vuex 商店将参数传递给 vue 中的 IIFE?
- scala - Scala:无法运行 gcloud compute ssh
- amazon-web-services - 带有 AWS CodePipeline 的 CI/CD 用于 Django 应用程序
- git - 如何在 Git 中显示拉取请求的审阅者/批准者(使用 GitBash)
- excel - 按标题重新格式化表列列表
- c# - 如何反序列化这个特定的 json 字符串?