如果Android studio导入老的安卓项目控制台出现了这样的报错,这是因为Java版本过高的原因 Could not open init generic class cache for initialization script
Could not open init generic class cache for initialization script 'C:\Users\29562\AppData\Local\Temp\wrapper_init87.gradle' (C:\Users\29562\.gradle\caches\7.1\scripts\5ux1ee2l5qll3nq60876ibw1v).> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 62* 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.
点击左上角的file-->settings
选择gradle
选择1.8版本的,不选择的话是默认的
完了之后重新同步一下
完了之后重新运行项目就行了
来源地址:https://blog.csdn.net/weixin_46012179/article/details/126135938
--结束END--
本文标题: 解决Android studio导入项目出现Could not open init generic class cache for initialization script问题
本文链接: https://www.lsjlt.com/news/404814.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0