I have been trying to sync my project but I'm getting this error on Android studio. I am using android studio 4.1 and gradle 6.5. the problem happen when I upgrade android studio from 4.0 to 4.1
In my case I've just needed to download the correct sdk.
Go to SdkManager (for example tap shift key twice and type "sdk manager") and be sure to download the SDK Platform that corresponds to your buildToolsVersion
defined in your project's build.gradle
.
(I don't know why Android studio was not detecting that sdk was not installed, it may be a bug)