Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
Recently while working on IntelliJ Android Studio 4.2.2 I got the above error message when I created a new project and tried to run it.
What is the problem?It seems that version 31.0.0 has some problems and downgrading to 30 resolves the issue.
Solution:- Go to File > Project Structure..,
- Now Select Modules from the Left Menu Options,
- Under Build Tool Version - select 30.0.3,
- Click Apply and OK
You may also need to do changes in SDK Manager under Tools, uninstall 31.0.0, and select Android R (API 30: version 11) to install 30.0.3

Have Questions? Post them here!
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!