I tried to build my android game but it gave me this error
- Where:
Script ‘C:UsersConsole.Write(name)Desktopunityproject filesUp We GoLibraryBeeAndroidPrjMono2xGradleunityLibraryGoogleMobileAdsPlugin.androidlibpackaging_options.gradle’ line: 2
- What went wrong:
A problem occurred evaluating script.
Could not find method android() for arguments [packaging_options_dyx3ty6ygvtewennq326hxzpf$_run_closure1@1cbf1c41] on project ‘:unityLibrary’ of type org.gradle.api.Project.
-
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
BUILD FAILED in 14s
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons could not be reused, use –status for details
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action
1[T] progress) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6542399aa1cb4f1c8de3e43116fd1b96>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I am using google admob in my game by the way.