When I try to build the game to my phone it throws this error. But before the installation of Admob, all was just working fine. I tried many changes listed on forums and etc but none of them works.
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\gradle-5.6.4\lib\gradle-launcher-5.6.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
stderr[
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user\Documents\Create with code\The Ball 2\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.1.1. Current version is 5.6.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\user\Documents\Create with code\The Ball 2\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\gradle\wrapper\gradle-wrapper.properties to gradle-6.1.1-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I just don't know what is the problem. But I'm guessing that this thing has something to do with Java and Android version...