1.报错错误
此错误发生于更新android studio版本之后打开旧版本项目时
Execution failed for task ‘:app:compileDebugJavaWithJavac’.
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: C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-33\core-for-system-modules.jar.
Error while executing process D:\soft\Android\Android Studio new\jbr\bin\jlink.exe with arguments {–module-path D:\soft\Android\Android Studio new\jbr\caches\transforms-3\f54fc0846e2bcea04d262d3e8c8abbd5\transformed\output\temp\jmod --add-modules java.base --output D:\soft\Android\Android Studio new\jbr\caches\transforms-3\f54fc0846e2bcea04d262d3e8c8abbd5\transformed\output\jdkImage --disable-plugin system-modules}
2.解决方案:
1.更换gradle jdk 为corretto 版本 (这里得当项目的不一定是这个版本,尽量尝试旧版本android studio能成功编译的版本,比如我之前用的就是java17 编译,以是尝试了17的其他版本就成功了)
2.clean
3.rebuildss
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |