简体   繁体   English

无法解析配置的所有文件':app:androidJdkImage

[英]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.失败:构建失败,出现异常。

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.出了什么问题:任务 ':app:compileDebugJavaWithJavac' 执行失败。

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.orghttps://help.gradle.org获得更多帮助

BUILD FAILED in 20s Exception: Gradle task assembleDebug failed with exit code 1在 20 秒内构建失败异常:Gradle 任务 assembleDebug 失败,退出代码为 1

I solved this issue by downloading the required NDK side by side package as shown in this screenshot for the required SDK platform.我通过下载所需的 NDK 并排包解决了这个问题,如所需 SDK 平台的屏幕截图所示。

If you keep getting errors after doing this, please share error logs or screenshots.如果执行此操作后仍然出现错误,请分享错误日志或屏幕截图。 Thanks.谢谢。

安卓工作室截图

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.

相关问题 无法解析配置 ':app:androidApis' 的所有文件 - Could not resolve all files for configuration ':app:androidApis' 无法解析配置 ':app:debugRuntimeClasspath 的所有文件 - Could not resolve all files for configuration ':app:debugRuntimeClasspath Android 构建无法解析配置“:app:debugCompileClasspath”的所有文件 - Android build Could not resolve all files for configuration ':app:debugCompileClasspath' 无法解析配置“:app:debugRuntimeClasspath”的所有文件。 问题 - Could not resolve all files for configuration ':app:debugRuntimeClasspath'. problem 无法解析配置 ':app:debugRuntimeClasspath' android studio 的所有文件 - Could not resolve all files for configuration ':app:debugRuntimeClasspath' android studio 错误“无法解析配置‘:app:debugCompileClasspath’的所有文件。” - error "Could not resolve all files for configuration ':app:debugCompileClasspath'." 无法解析配置':compileClasspath'的所有文件 - Could not resolve all files for configuration ':compileClasspath' 无法解析配置':app:_debugApkCopy'的所有依赖项 - Could not resolve all dependencies for configuration ':app:_debugApkCopy' 无法解析配置“:app:prereleaseCompileClasspath”的所有工件 - Could not resolve all artifacts for configuration ':app:prereleaseCompileClasspath' 无法解析配置':app:debugCompileClasspath的所有依赖项 - Could not resolve all dependencies for configuration ':app:debugCompileClasspath
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM