【发布时间】:2022-01-17 06:57:06
【问题描述】:
在我的 Flutter 项目更新到 JAVA 11 后,当我尝试在任何设备上运行应用程序时突然出现此错误。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileQa4DebugJavaWithJavac'.
> Could not resolve all files for configuration ':app: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: /Users/enzoftware/Library/Android/sdk/platforms/android-30/core-for-system-modules.jar.
> jlink executable /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents/Home/bin/jlink does not exist.
* 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 56s
Exception: Gradle task assembleQa4Debug failed with exit code 1
我尝试做flutter clean,再次安装适用于 API 30 的 SDK 并从头开始重新安装所有内容,但问题仍然存在。
欢迎提出任何建议。
【问题讨论】: