简体   繁体   English

将 Flutter 项目更新为 JAVA 11 后的问题

[英]Issue after update Flutter project to JAVA 11

After the update of my Flutter project to JAVA 11 suddenly I got this error when I try to run the app on any device.将我的 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

I tried doing flutter clean , install again the SDK for API 30 and reinstalling everything from scratch but the problem persist.我尝试做flutter clean ,再次为 API 30 安装 SDK 并从头开始重新安装所有内容,但问题仍然存在。

Any suggestions are welcome.欢迎任何建议。

Change version of JAVA 8 because JAVA 11 isn't good for using Flutter.更改 JAVA 8 的版本,因为 JAVA 11 不适合使用 Flutter。 I was on sam我在山姆

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM