gpt4 book ai didi

flutter - gradle 构建失败任务 ':webview_flutter:compileDebugJavaWithJavac' 执行失败

转载 作者:行者123 更新时间:2023-12-04 14:57:51 25 4
gpt4 key购买 nike

我的 flutter 应用程序甚至没有 webview_flutter 插件,它为此显示错误。 Gradle 构建失败。首先,它告诉我将 minSDkVersion 设置为 19。我这样做了,但仍然出错。我有相同的应用程序,但之前运行的项目不同,代码和插件完全相同。我不明白这是怎么回事。请帮忙。

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\thumbnails-
1.0.1\android\src\main\java\com\asapjay\thumbnails\ThumbnailsPlugin.java uses or overrides a
deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\flutter\.pub-cache\hosted\pub.dartlang.org\webview_flutter-
2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31: error:
cannot find symbol
private ThreadedInputConnectionProxyAdapterView proxyAdapterView;
^
symbol: class ThreadedInputConnectionProxyAdapterView
location: class InputAwareWebView
C:\flutter\.pub-cache\hosted\pub.dartlang.org\webview_flutter-
2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112: error:
cannot find symbol
new ThreadedInputConnectionProxyAdapterView(
^
symbol: class ThreadedInputConnectionProxyAdapterView
location: class InputAwareWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':webview_flutter:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more
log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 44s
Exception: Gradle task assembleDebug failed with exit code 1

最佳答案

ThreadedInputConnectionProxyAdapterView 的扩展名 .jav 有误作为临时修复,您可以手动将其更改为 .java。

我暂时将 webview_flutter 降级回 2.0.4。 (在降级 webview_flutter 之后,如果此解决方案不起作用,那么您需要检查 pubsepc.lock 文件中的 webview_flutter,因为其他一些依赖项可能会扩展 webview_flutter,因此该包将在 pubsepc.lock 文件中可见,那么您只需要从该文件中降级 webview_flutter )

尽情享受吧!

关于flutter - gradle 构建失败任务 ':webview_flutter:compileDebugJavaWithJavac' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67589111/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com