[英]gradle build failure Execution failed for task ':webview_flutter:compileDebugJavaWithJavac'
[英]Flutter webview_flutter build is failing
我正在尝试安装 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
您是否遵循此插件的 iOS 的所有安装?
这是来自webview_flutter页面本身:
To use this plugin on iOS you need to opt-in for the embedded views preview by adding a boolean property to the app's Info.plist file, with the key io.flutter.embedded_views_preview and the value YES.
这个好像也有关系,看看: https://github.com/flutter/flutter/issues/50190
就我而言,问题是我手动编辑了 podfile 以将我自己的(非颤振)pod 添加到项目中。 但是,flutter 版本不会尝试编辑(或覆盖)podfile(也许这很好),因此 podfile 不会进行必要的更改来支持 webview_flutter。 我通过创建一个全新的 flutter 项目并将新项目生成的 podfile 与我当前的版本进行比较来解决这一切。 他们看起来明显不同。
flutter 升级为我解决了问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.