issue with gradle when implementing AdMob Plugin and Android Template

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

I couldn’t inmplement adMod plugin,
Although I have followed the exact steps mentioned in more than a tutorial, like this here:

https://androidrepo.com/repo/Poing-Studios-Godot-AdMob-Android-iOS-android-kotlin

when I uncheck the Options in (Export): “Use Custom Build” in Custom Template and “Godot Ad mob” in Plugins, the game can compile and install to the device seamlessly, either directly to device, or by Exporting it

however when I check “Use Custom Build” and “Godot Ad mob”, the game always gives me an error with this error code and message:

Building of Android project failed, check output for the error.
Alternatively visit docs.godotengine.org for Android build
documentation.

ii

The system cannot find the path specified. Error: Could not find or
load main class org.gradle.wrapper.GradleWrapperMain Caused by:
java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

Exit Code: 1

I tried steps with Shin-NiL Admob plugin, and also with the AdMob Editor Plugin from “Poing-Studios”
I have also added the manifest with the required App Package and App ID,
and although added the ads’ IDs,
and also installed the cmdlines-tools latest, and accepted all the licenses.
Thank you in advance, I really appreciate your help.