【问题标题】:Flutter Webview throws compiling error -ThreadedInputConnectionProxyAdapterView location: class InputAwareWebViewFlutter Webview 抛出编译错误-ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView
【发布时间】:2021-08-07 12:44:23
【问题描述】:

我使用的是 Webview 版本

webview_flutter: ^2.0.6

android studio 在运行时抛出此错误并停止构建

操作系统版本

minSdkVersion 19

targetSdkVersion 30

A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31: 错误:找不到符号私有 ThreadedInputConnectionProxyAdapterView proxyAdapterView; ^ 符号:类 ThreadedInputConnectionProxyAdapterView 位置:类 InputAwareWebView

A:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112: 错误:找不到符号 新的 ThreadedInputConnectionProxyAdapterView( ^ 符号:类 ThreadedInputConnectionProxyAdapterView 位置:类 InputAwareWebView 注意:一些输入文件使用或覆盖一个已弃用的 API。注意:使用 -Xlint:deprecation 重新编译以获取详细信息。 2 个错误

FAILURE:构建失败并出现异常。

如何解决这个错误?

【问题讨论】:

    标签: android flutter flutter-web


    【解决方案1】:

    正如 Ravi 所说,将文件扩展名重命名为 .java 就可以了。

    文件位于:

    {your flutter folder}\.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\ThreadedInputConnectionProxyAdapterView.java

    【讨论】:

      【解决方案2】:

      ThreadedInputConnectionProxyAdapterView 有错误的扩展名 .jav 只需将其更改为 .java,直到颤振团队发布修复。

      问题请参考github链接

      https://github.com/flutter/flutter/issues/82800

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-02-09
        相关资源
        最近更新 更多