[英]Could not resolve all files for configuration ':app:androidJdkImage
I am trying to build flutter apk on debug mode from android studio.我正在尝试从 android 工作室在调试模式下构建 flutter apk。
Flutter run I get this error: Flutter 运行我得到这个错误:
Launching lib/main.dart on sdk gphone x86 arm in debug mode... Running Gradle task 'assembleDebug'...在调试模式下在 sdk gphone x86 arm 上启动 lib/main.dart... 运行 Gradle 任务 'assembleDebug'...
FAILURE: Build failed with an exception.失败:构建失败,出现异常。
Could not resolve all files for configuration ':app:androidJdkImage'.
无法解析配置“: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}.
无法转换 core-for-system-modules.jar 以匹配属性 {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}。 > Execution failed for JdkImageTransform: /Users/mac/Library/Android/sdk/platforms/android-30/core-for-system-modules.jar.
> JdkImageTransform 执行失败:/Users/mac/Library/Android/sdk/platforms/android-30/core-for-system-modules.jar。 > jlink executable /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/jlink does not exist.
> jlink 可执行文件 /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/jlink 不存在。
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. Run with --scan to get full insights.
使用 --info 或 --debug 选项运行以获取更多日志 output。使用 --scan 运行以获取完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获得更多帮助
BUILD FAILED in 20s Exception: Gradle task assembleDebug failed with exit code 1在 20 秒内构建失败异常:Gradle 任务 assembleDebug 失败,退出代码为 1
In my case, I only need update Android Studio to newer version and it's working normally again.就我而言,我只需要将 Android Studio更新到更新版本,它又可以正常工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.