我正在尝试安装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.pubspec.yml
dependencies:
flutter:
sdk: flutter
webview_flutter: ^0.3.19+8我试着跑,但没有解决它。
flutter clean
flutter pub cache repair
发布于 2020-04-14 09:58:15
您是否遵循此插件的iOS安装的所有步骤?
这来自webview_flutter页面本身:
要在iOS上使用此插件,您需要在应用程序的Info.plist文件中添加一个布尔属性,键为io.flutter.embedded_views_preview,值为YES,以选择加入嵌入式视图预览。
这似乎也是相关的,看一看:https://github.com/flutter/flutter/issues/50190
发布于 2020-08-25 00:27:19
在我的例子中,问题是我手动编辑了podfile,以便将我自己的(非flutter) pod添加到项目中。但是,flutter构建不会尝试编辑(或覆盖)播客文件(也许这很好),因此播客文件不会有支持webview_flutter所需的更改。我创建了一个全新的flutter项目,并将新项目生成的podfile与我当前的版本进行了比较,从而弄清楚了这一切。它们看起来明显不同。
https://stackoverflow.com/questions/61195331
复制相似问题