I faced the same problem but I uninstalled android studio and reinstalled it while connected to the internet . it downloaded the updated SDK and other tools by its self . it works perfectly
After reinstalling and upgrading my android studio to android 4, I faced the same challnge. but what I did was to go to tool->sdk manager and then install some other APIs including the error messages API 28 not installed and it works fine.
Turn on Internet and open android studio in that select "Tools->sdk manager" and select api level 29, download and apply it.
Close android studio and open again 💯✨
Check the buildToolsVersion of your project in app level Gradle file.
Then check whether you have installed that sdk version. You can check it on AVD manager.
If you haven't buildToolsVersion sdk installed then install first and rebuild the project.
Ex. If your buildToolsVersion is 28 , you should install Android 9.0(Pie) - API Level 28 SDK.