您当前的位置: 首页 >  Java

蓝不蓝编程

暂无认证

  • 0浏览

    0关注

    706博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

鸿蒙编译报错:Unable to find the java component with apiVersion 4.

蓝不蓝编程 发布时间:2021-10-15 20:56:06 ,浏览量:0

问题现象
SdkError: DOWNLOAD_SDK_ERROR
	 > Cause: Unable to find the java component with apiVersion 4.
	 > Solution: 
		1.Open SDK Manager and download java.
		2.Alternatively, modify the compileSdkVersion settings in the project- and module-level build.gradle files. 

解决方案

修改build.gradle文件:

ohos {
    compileSdkVersion 4
    defaultConfig {
        compatibleSdkVersion 3
    }
}

改成:

ohos {
    compileSdkVersion 5
    defaultConfig {
        compatibleSdkVersion 3
    }
}
关注
打赏
1639405877
查看更多评论
立即登录/注册

微信扫码登录

0.0892s