HarmonyOS 鸿蒙Next 用Deveco打开编译DDK示例,出现问题,疑似JAVA版本过高

HarmonyOS 鸿蒙Next 用Deveco打开编译DDK示例,出现问题,疑似JAVA版本过高 首先sync不过,出现问题:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

随后,我在命令行手动gradle:

gradle --warning-mode allFAILURE: Build failed with an exception.
* Where:
Settings file 'C:\Users\XXX\Desktop\deweather\hwhiai-ddk-100.320.030.292\sample\inference_cpu_demo\Demo_Soure_Code\settings.gradle'
* What went wrong:
Could not compile settings file 'C:\Users\XXX\Desktop\deweather\hwhiai-ddk-100.320.030.292\sample\inference_cpu_demo\Demo_Soure_Code\settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 61

搜索后疑似java版本过高,我使用的Deveco版本如下:

devecostudio-windows-3.1.0.501

没有找到JAVA的设置入口。并且,API6的JAVA也下载了:

所以,我想请问下,这个问题主要在哪?是JAVA版本过高吗?要如何设置?如何解决呢?谢谢~


更多关于HarmonyOS 鸿蒙Next 用Deveco打开编译DDK示例,出现问题,疑似JAVA版本过高的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

DevEco Studio暂没有适配gradle7.3以上的版本哈!

更多关于HarmonyOS 鸿蒙Next 用Deveco打开编译DDK示例,出现问题,疑似JAVA版本过高的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


在HarmonyOS鸿蒙Next中使用DevEco Studio编译DDK示例时,如果出现疑似Java版本过高的问题,可能是由于DevEco Studio不支持当前安装的Java版本。鸿蒙Next的DDK开发通常依赖于特定的Java版本,建议检查DevEco Studio的官方文档或系统要求,确认支持的Java版本范围。如果确实存在Java版本不兼容的情况,建议安装DevEco Studio推荐的Java版本,并确保环境变量配置正确。

回到顶部