鸿蒙编译报错:Unable to find the java component with apiVersion 4.
作者:互联网
问题现象
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
}
}
标签:java,compileSdkVersion,component,Unable,报错,build,defaultConfig,find 来源: https://blog.csdn.net/yinxing2008/article/details/120790637