Go to Settings ->Project Structure -> Select the Modules Tab
-> Select the latest 'Sdk and Build Tools'
Go to your build.gradle file then update the 'targetSdkVersion and CompileSdk' to the latest
build version that you selected eg compileSdk 32 and targetSdkVersion 32