Recently I encountered this issue after updating my android studio to the latest version 4.0.
Recently I encountered this issue after updating my android studio to the latest version 4.0.
I recently solved this problem
Open Android Studio
File > Settings > Appearance & Behaviour > System Settings > Android SDKSDK ToolsAndroid SDK Build ToolsShow package Details at the bottom right corner29.0.2Apply > (Wait until download completion) > Finish > Ok



So tried all the solutions but got stuck at one point, couldn't locate "C:\Users\Username\AppData\Local\Android\Sdk\build-tools" this path.
The way around this is to close the current project you're working on.. Click "Configure" at the bottom right of Android studio Click 'SDK manager" Click 'SDK tools" Tick 'Show Package Details" look for the corresponding build-tools, in my case, 29.0.2 Click apply
it should download the build tool>>> then rebuild project
Please note that 'platform-tools' differs from 'build-tools'.
Here the topic is 'build-tools' so here's what worked for my case:
what you need to do is simply download required
'build-tools' from somewhere like: https://androidsdkmanager.azurewebsites.net/Buildtools
then copy the downloaded folder somewhere like(if you use Windows): C:\Users\Username\AppData\Local\Android\Sdk\build-tools,
then change the downloaded file name to the version of build tool(for this question the version is 29.0.2).
Re-build and re-run your project.
Good luck!
Each version of the Android Gradle Plugin now has a default version of the build tools.
So, probably you specified build tool version explicitly in the build file. Just remove buildToolsVersion = "x.y.z" from your build.gradle script.
If, for some reason, you need that specific revision, follow the other answer.