当前位置:   article > 正文

鸿蒙编译报错:Unable to find the java component with apiVersion 4._cause: unable to find the following components: em

cause: unable to find the following components: emulator solution: 1.verify

问题现象

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. 
  • 1
  • 2
  • 3
  • 4
  • 5

解决方案

修改build.gradle文件:

ohos {
    compileSdkVersion 4
    defaultConfig {
        compatibleSdkVersion 3
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

改成:

ohos {
    compileSdkVersion 5
    defaultConfig {
        compatibleSdkVersion 3
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/282255
推荐阅读
相关标签
  

闽ICP备14008679号