admin管理员组

文章数量:1200423

Here is the error that I am facing while launching flutter application on andoid mobile:

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_plugin_android_lifecycle:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:androidJdkImage'.
   > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JdkImageTransform: C:\Users\HP 445 G8\AppData\Local\Android\sdk\platforms\android-34\core-for-system-modules.jar.
         > Error while executing process C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe with arguments {--module-path C:\Users\HP 445 G8\.gradle\caches\transforms-3\ffae58e6f7472c2c8e2cdd6bf43d012d\transformed\output\temp\jmod --add-modules java.base --output C:\Users\HP 445 G8\.gradle\caches\transforms-3\ffae58e6f7472c2c8e2cdd6bf43d012d\transformed\output\jdkImage --disable-plugin system-modules}

* 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 .

BUILD FAILED in 9s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

here is the flutter, dart and java versions that shows in cmd(command-line-interface)

But when I run flutter doctor --verbose in terminal in android studio, then it shows following flutter and java versions

PS D:\devlynx flutter projects\chatblok> flutter doctor --verbose
[√] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Version 10.0.26100.2894], locale en-US)
    • Flutter version 3.27.0 on channel stable at D:\flutter sdks\flutter_windows_3.27.0-stable
    • Upstream repository .git
    • Framework revision 8495dee1fd (6 weeks ago), 2024-12-10 14:23:39 -0800
    • Engine revision 83bacfc525
    • Dart version 3.6.0
    • DevTools version 2.40.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
    • Android SDK at C:\Users\HP 445 G8\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12508038-b607.1)
    • All Android licenses accepted.

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

[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at /.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2024.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       
    • Dart plugin can be installed from:
       
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12508038-b607.1)

[√] VS Code (version 1.96.4)
    • VS Code at C:\Users\HP 445 G8\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.102.0

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 13 (API 33) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.26100.2894]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 131.0.6778.265
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 132.0.2957.115

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

本文标签: javaExecution failed for task 39flutterpluginandroidlifecyclecompileDebugJavaWithJavac39Stack Overflow