美文网首页
鸿蒙编译报错:Unable to find the java c

鸿蒙编译报错:Unable to find the java c

作者: 蓝不蓝编程 | 来源:发表于2021-10-15 20:55 被阅读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
    }
}

相关文章

网友评论

      本文标题:鸿蒙编译报错:Unable to find the java c

      本文链接:https://www.haomeiwen.com/subject/iznmoltx.html