Flutter 执行任务 ':app:processDebugManifest' 失败

时间:2021-06-28 09:01:14

标签: flutter dart flutter-dependencies flutter-test flutter-debug

Java Version我是 Flutter 新手,起初我的项目运行良好,但突然间我开始遇到这个问题: FAILURE:构建失败,出现异常。

  • 出了什么问题: 任务“:app:processDebugMainManifest”执行失败。
<块引用>

无法使字段私有 final java.lang.String java.io.File.path 可访问:模块 java.base 不会“打开 java.io”到未命名的模块 @1f05eb0a 现在,每当我运行项目甚至尝试创建新项目时,我都会收到这样的错误,我什至尝试了与此查询相关的可用答案,但未能对其进行调试。 这是我的颤振版本:

<UseWPF>true</UseWPF>

这是我的 pubspec.yaml 文件:


PS C:\Work\t_post> flutter doctor -v
[√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19042.1052], locale en-US)
    • Flutter version 2.2.2 at C:\Work\flutter
    • Framework revision d79295af24 (2 weeks ago), 2021-06-11 08:56:01 -0700
    • Engine revision 91c9fc8fe0
    • Dart version 2.13.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Java\jdk-16.0.1\bin\java
    • Java version Java(TM) SE Runtime Environment (build 16.0.1+9-24)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] VS Code (version 1.57.1)
    • VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.23.0

[√] Connected device (3 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 91.0.4472.124
    • Edge (web)                  • edge          • web-javascript • Microsoft Edge 91.0.864.54

! Doctor found issues in 1 category.

1 个答案:

答案 0 :(得分:0)

只是将 JDK 版本从 16 降级到 15 对我有用。