运行不了,是什么问题呢
来源:3-4 如何在Windows电脑上搭建Flutter开发环境?

酷创_魏
8天前
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: F:\ASdoc\platforms\android-35\core-for-system-modules.jar.
Error while executing process F:\androidStudio\jbr\bin\jlink.exe with arguments {–module-path C:\Users\KC.PC-20230302DRYX.gradle\caches\transforms-3\6016c63accfa660ece0958948691c421\transformed\output\temp\jmod --add-modules java.base --output C:\Users\KC.PC-20230302DRYX.gradle\caches\transforms-3\6016c63accfa660ece0958948691c421\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 https://help.gradle.org.
BUILD FAILED in 5s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] This is likely due to a known bug in Android Gradle Plugin (AGP) versions less than 8.2.1, │
│ when │
│ 1. setting a value for SourceCompatibility and │
│ 2. using Java 21 or above. │
│ To fix this error, please upgrade your AGP version to at least 8.2.1. The version of AGP that │
│ your project uses is likely defined in: │
│ F:\shuiyin_app2\android\settings.gradle, │
│ in the ‘plugins’ closure (by the number following “com.android.application”). │
│ Alternatively, if your project was created with an older version of the templates, it is likely │
│ in the buildscript.dependencies closure of the top-level build.gradle: │
│ F:\shuiyin_app2\android\build.gradle, │
│ as the number following “com.android.tools.build:gradle:”. │
│ │
│ For more information, see: │
│ https://issuetracker.google.com/issues/294137077 │
│ https://github.com/flutter/flutter/issues/156304 │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
1回答
-
CrazyCodeBoy
1天前
问题解决了吗,是新创建的项目运行不了还是?00
相似问题