鸿蒙编译报错:Unable to find the java component with apiVers

发布于 2021-10-15 20:57
浏览
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. 

鸿蒙编译报错:Unable to find the java component with apiVers-鸿蒙HarmonyOS技术社区

解决方案

修改build.gradle文件:

ohos {
    compileSdkVersion 4
    defaultConfig {
        compatibleSdkVersion 3
    }
}

改成:

ohos {
    compileSdkVersion 5
    defaultConfig {
        compatibleSdkVersion 3
    }
}

1
收藏
回复
举报
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源 去关联
    相关推荐