DevEcoStudio: DOWNLOAD_SDK_ERROR after upgrading to SDK 6

839 Views Asked by At

I have another issue after related question

DevEcoStudio Version: 2.1 Release and 3.0 Beta 1

SDK: 6

Already updated compileSDKVersion version in project level and module level build.gradle files

ohos {
    compileSdkVersion 6
    defaultConfig {
        compatibleSdkVersion 5
    }
    buildTypes {
        release {
            proguardOpt {
                proguardEnabled false
                rulesFiles 'proguard-rules.pro'
            }
        }
    }
}

Error Screenshot:

enter image description here

1

There are 1 best solutions below

0
On

As the solution in error suggests:

SdkError: DOWNLOAD_SDK_ERROR > Cause: Unable to find the toolchains component. > Solution: 1.Open SDK Manager and download toolchains. 2.Alternatively, modify the compileSdkVersion settings in the project- and module-level build.gradle files.

Navigate to Tools-> SDK Manager -> Select "SDK Tools" tab under HarmonyOS SDK. Check "Toolchains" for the installation. Confirm. Accept the agreement and Download.

enter image description here

Sync and re-build the project successfully.

EDIT: In case, someone is facing the same issue with the new DevEco IDE (details below) and SDK 6, follow these steps:

DevEco Studio Version:

DevEco Studio 3.0 Beta1 Build Version: 3.0.0.601, built on October 19, 2021

Solution: Open project-level and module-level build.gradle files and change:

compileSdkVersion to 6 (by default it is 7)
compatibleSdkVersion to 5 (by default it is 4)