admob plugin Gradle build failed in unity 2019.4.36f1

149 views
Skip to first unread message

Alex gm

unread,
Dec 19, 2023, 9:36:22 AM12/19/23
to Google Mobile Ads SDK Developers
admob plugin block apk build in unity 2019.4.36f1 in play mode it works fine i followed all steps in https://developers.google.com/admob/unity/quick-start
i use latest 8.6.0 it also failed to build gradle when i import and setup it in empty project


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':unityLibrary'.
> Cannot change strategy of configuration ':unityLibrary:aarArtifacts' after it has been resolved.

* 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 1s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr)



CommandInvokationFailure: Gradle build failed.
D:/unity/2019.4.36f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\unity\2019.4.36f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':unityLibrary'.
> Cannot change strategy of configuration ':unityLibrary:aarArtifacts' after it has been resolved.

* 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 1s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0702eaa7f9c54a9eb3150aca262c08fe>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <f9102adc00864e0a9c861fc3dd597bda>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)







Mobile Ads SDK Forum Advisor

unread,
Dec 19, 2023, 9:46:59 AM12/19/23
to mors...@gmail.com, google-adm...@googlegroups.com

Hi Alex, 

Thank you for contacting the Mobile Ads SDK support team.

It sounds like an integration specific issue. I do not notice any issues with our Google sample project. Can you provide us charles log along with your sample project which replicates the issue for further investigation.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r2cmn:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages