app:checkDebugAarMetadata Error in Android Studio

Asked on August 28, 2023
Hi, I am facing app:checkDebugAarMetadata error while running my application in Android studio. Build output says :
:app:checkDebugAarMetadata
some issues were found when checking AAR metadata:
What wrong am I doing?

Replied on August 28, 2023
The problem is related to compileSdk and targetSdk in build.gradle file. The values of compileSdk and targetSdk should be latest SDK installed in your Android Studio.
You can check latest SDK in Android Studio navigating to following menu.
Android Studio (menu) -> Preferences -> Appearance & Behavior -> System Settings -> Android SDK
Check here highest installed Android API level. Suppose it is 34. Now assign this number to compileSdk and targetSdk in build.gradle file.
//build.gradle
compileSdk 34
defaultConfig {
minSdk 29
targetSdk 34
versionCode 1
versionName "1.0"
}

Replied on August 28, 2023
Thanks. Resolved my issue.