鸿蒙工程编译报错:check whether the 'app'
2021-10-13 本文已影响0人
蓝不蓝编程
问题
鸿蒙工程编译报错:
Please check 'entry' module config.json, check whether the 'app' sub-tag 'apiVersion' label is notEmpty
![](https://img.haomeiwen.com/i6169789/c5928aba5e24721b.png)
解决方案
升级gradle版本
1、如果启动项目,有这个提示,可以直接升级。
![](https://img.haomeiwen.com/i6169789/354685e95d63e67a.png)
2、 如果没有,可以手动修改build.gradle文件
dependencies {
classpath 'com.huawei.ohos:hap:2.4.4.2'
classpath 'com.huawei.ohos:decctest:1.0.0.7'
}
改成:
dependencies {
classpath 'com.huawei.ohos:hap:3.0.3.2'
classpath 'com.huawei.ohos:decctest:1.2.6.0'
}
![](https://img.haomeiwen.com/i6169789/65e498f55d37988a.png)
关于我
厦门大学计算机专业|华为八年高级工程师
十年软件开发经验,5年编程培训教学经验
目前从事编程教学,软件开发指导,软件类毕业设计指导。
所有编程资料及开源项目见https://cxyxy.blog.csdn.net/article/details/120405881