godot admob build error

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By abhinavsingh

godot build error after adding admob addon

please help godot community hw to fix it

what went wrong:
Excecution failes for task’: checkDebugAarMetadata’

A failure occured while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a
dependency AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module’s compileSdkVersion (android-30).
Dependency:anroidx.appcomat:appcmpat:1.4.2.
AAR metadata file:c:\users\machine\gradle\aar-metadata.properties.

admob error whchle build apk

:bust_in_silhouette: Reply From: abhinavsingh

jai shree krishna
solution with filenames

/////////////////////////////////////////////////////////

config.gradle
1)change values of min sdk to 21.
2)change value of compile sdk to 31.
3)change target sdk vale to 31.
////////////////////////
ext.versions = [
androidGradlePlugin: ‘4.2.2’,

compileSdk         : 31,

minSdk             : 21,
targetSdk          : 31,

]

/////////////////////////////////////////////////////////////
AndroidManifest.html
<activity
android:exported=“true”

////////////////////////////////////////////////
build.gradle
dependencies {
implementation(“androidx.multidex:multidex:2.0.1”)
}