首页 > 解决方案 > 第一次 Flutter gradle 构建失败(出了什么问题:- java/lang/Throwable$WrappedPrintWriter)

问题描述

我正在尝试仅构建第一个颤振项目,它显示 gradle build 失败,我不明白为什么会发生这种情况我搜索了很多,但没有解决方案对我有用。一段时间后,我再次开始研究颤振。

在颤振医生中,一切都很好,哈巴狗正在工作。我做了颤振升级然后运行,但它仍然无法正常工作。

有人可以帮忙吗?

FAILURE: Build failed with an exception.

* What went wrong:
java/lang/Throwable$WrappedPrintWriter

* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1

颤振医生-v

[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.18363.1198], locale en-US)
    • Flutter version 1.22.4 at D:\flutter
    • Framework revision 1aafb3a8b9 (3 weeks ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4
    • Pub download mirror https://pub.dev

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at D:\Android\SDK
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = D:\Android\SDK
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at D:\Program Files\Android\Android Studio
    • Flutter plugin version 48.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.51.1)
    • VS Code at C:\Users\vishnu Agarwal\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[√] Connected device (1 available)
    • SM G770F (mobile) • RF8N217YVLX • android-arm64 • Android 10 (API 29)

• No issues found!

标签: fluttergradleflutter-build

解决方案


推荐阅读