Hello, I went through other forums to fix this error. And tried most of them. But, nothing changed. I also changed my Unity version. Still the error did not go away.
Please provide the full log. It contains the reasons for your error.
Do you use any Ads?
Do you use any custom manifest, etc. files?
Yes, I use AdMob. Where can I see the full log?
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'D:\Unity\KyaooProject\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle' line: 2
* What went wrong:
A problem occurred evaluating project ':unityLibrary'.
> Could not set unknown property 'useAndroidX' for extension 'android' of type com.android.build.gradle.LibraryExtension.
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':unityLibrary'.
> compileSdkVersion is not specified. Please add it to build.gradle
BU�LD FAILED in 6s
]
stdout[
> Configure project :launcher
WARNING:The option setting 'android.aapt2FromMavenOverride=D:\Unity\GeneralWork\2022.3.45f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\34.0.0\aapt2.exe' is experimental.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ae4609762e3443068420583efacb931f>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ae4609762e3443068420583efacb931f>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <ae4609762e3443068420583efacb931f>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <ae4609762e3443068420583efacb931f>: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 <ae4609762e3443068420583efacb931f>: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 <ae4609762e3443068420583efacb931f>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <ae4609762e3443068420583efacb931f>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <ae4609762e3443068420583efacb931f>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Is this it?
Try recreating your templates (Can be found in Player → Publishing settings). Seems that current are corrupted
Full error log, please
Sure,
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: D:\Unity\KyaooProject\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:21: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintTop_toTopOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:21: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintStart_toStartOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:21: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintEnd_toEndOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:21: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintBottom_toBottomOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:33: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintTop_toTopOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:33: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintStart_toStartOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:33: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintEnd_toEndOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:33: AAPT: error: attribute layout_constraintBottom_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintBottom_toTopOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:44: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintStart_toStartOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:44: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintEnd_toEndOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:44: AAPT: error: attribute layout_constraintBottom_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintBottom_toTopOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:44: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintTop_toBottomOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:54: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintTop_toTopOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:54: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintStart_toStartOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:54: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintEnd_toEndOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:54: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintBottom_toBottomOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:70: AAPT: error: attribute layout_constraintDimensionRatio (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintDimensionRatio) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:70: AAPT: error: attribute layout_constraintEnd_toStartOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintEnd_toStartOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:70: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintBottom_toBottomOf) not found.
ERROR:C:\Users\mertt\.gradle\caches\transforms-3\d6ed7d535ae2e2d624afdf453301a66b\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:70: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.DefaultCompany.com.unity.template.mobile2D:layout_constraintTop_toTopOf) not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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
BU�LD FAILED in 54s
0x00007ff7ab4fde3d (Unity) StackWalker::GetCurrentCallstack
0x00007ff7ab502f19 (Unity) StackWalker::ShowCallstack
0x00007ff7ac4f2eb1 (Unity) GetStacktrace
0x00007ff7acbadffe (Unity) DebugStringToFile
0x00007ff7aa414c68 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000020403ff64d3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000020403ff63eb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000020403ff6130 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000020409a43085 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x0000020409a42d93 (Mono JIT Code) UnityEditor.Android.GradleInvokationException:ParseAndShowException ()
0x0000020403ff1ef3 (Mono JIT Code) UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext)
0x0000020409a23073 (Mono JIT Code) UnityEditor.Android.PostProcessAndroidPlayer:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput)
0x00000204099c1e03 (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
0x00000204099c14d1 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
0x00000204099c1845 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
0x00007ff8da3b4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ff8da2ed254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ff8da2ed3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff7ab416d14 (Unity) scripting_method_invoke
0x00007ff7ab3f4924 (Unity) ScriptingInvocation::Invoke
0x00007ff7acf21c41 (Unity) CallMono
0x00007ff7acf2b1ed (Unity) PostprocessPlayer
0x00007ff7acf25a83 (Unity) DoBuildPlayer_PostBuild
0x00007ff7acf23b9e (Unity) DoBuildPlayer
0x00007ff7acf17038 (Unity) BuildPlayer
0x00007ff7aac7eebf (Unity) BuildPipeline::BuildPlayerInternalNoCheck
0x00007ff7aaa5e4ac (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x00000203ffe15c17 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
0x00000203ffe153e3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x00000203ffe1188b (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x00000203ffdb103b (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x00000203ffda4df3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x00000202ac46673b (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x00000204735436a2 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x0000020473543483 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x000002047352e0eb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x000002047344c2df (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x000002047351c62b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x00000203ffc63dab (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x00000203ffc63c03 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x00000203ffc6374b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x00000203ffc63633 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x00000203a47e1683 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:ProcessEvent (UnityEngine.UIElements.EventBase)
0x00000203a47e11e3 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEvent (UnityEngine.UIElements.EventBase)
0x00000203a47e0f1f (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase)
0x00000203a47e0c13 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x00000203ffc60623 (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000203a7aa098e (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x00000203a7aa023b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000203a47cadb3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x00000203a47cab6b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x00000203a47caa8b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x00000203a7aa073b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x00000203a7a7f6a3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x00000203a7a9fc9b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x00000203a7b5cdb3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x00000203a7b5c843 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x00000203a7b5c5ff (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x00000203a7b5c51b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x00000203a7b5b9c5 (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x00000203a7b5bb06 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ff8da3b4c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ff8da2ed254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ff8da2ed3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff7ab416d14 (Unity) scripting_method_invoke
0x00007ff7ab3f4924 (Unity) ScriptingInvocation::Invoke
0x00007ff7ab3ef445 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff7ab54825a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff7abf4b0b4 (Unity) GUIView::ProcessRetainedMode
0x00007ff7ac524aa0 (Unity) GUIView::OnInputEvent
0x00007ff7abf4afe3 (Unity) GUIView::ProcessInputEventFromAPI
0x00007ff7abf4aeb8 (Unity) GUIView::ProcessInputEvent
0x00007ff7ac5258de (Unity) GUIView::ProcessEventMessages
0x00007ff7ac51f6f4 (Unity) GUIView::GUIViewWndProc
0x00007ff969feef5c (USER32) CallWindowProcW
0x00007ff969fee684 (USER32) Dispatc<message truncated>
Did you resolve dependencies after recreating templates? Which AdMob version is used in your project?
I just recreated the templates. And I tried to rebuild. But nothing changed. AdMob version 9.2.0
Try resolving dependencies before building:
Assets
>External Dependency Manager
>Android Resolver
>Force Resolve
After doing “Force Resolve” the errors were fixed. I fixed the error. But now when I try to open the game from my phone, I get the error “Game has stopped”
Full error log, please
Hello, I don’t know how to get the log. Because after running the game’s apk file on my phone, I get a “Game has stopped” error when I try to enter the game. How can I find out the reason? Thank you very much for your interest.
Try to filter by your app, those crashes seem unrelated to an actual Unity application.