2

I am working on a multiPlayer game in Unity.The same works fine when just running it as it is. But after I install Photon2 in Unity and while trying to build the same to my android , I am getting the error

"FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':launcher:packageDebug'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Entry name 'AndroidManifest.xml' collided

I tried to fix this error by changing

org.gradle.jvmargs=-Xmx4608m 

as per the answer here A failure occurred while executing com.android.build.gradle.internal.tasks, but it was of no use.

I changed the JDK path to C:\Program Files\Java\jdk1.8.0_291 rather than the Unity version provided and also added it under the path variable of system and user variable in the environonmental variables. I changed the Maximum JVM heap size from 4096 to 98304 as per this answer https://forum.unity.com/threads/android-gradle-build-fails-with-execution-failed-for-task-packagedebug.659473/ , but it didnt work. Also I deleted the .gradle files in C and restarted Unity.

I don't know last week it was working. But this week after updating the Unity version things seems to go down wire. I also later recreated the project in the earlier version. I don't after I import photon only, this problem happensError screen Shot

I have also the log file here:

What went wrong:
Execution failed for task ':launcher:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Entry name 'AndroidManifest.xml' collided

* 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 10s
]
stdout[

> Configure project :launcher
WARNING: The option 'android.enableR8' is deprecated and should not be used anymore.
It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8.

> Task :unityLibrary:preBuild UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task :unityLibrary:preDebugBuild UP-TO-DATE
> Task :launcher:preDebugBuild UP-TO-DATE
> Task :unityLibrary:compileDebugAidl NO-SOURCE
> Task :unityLibrary:packageDebugRenderscript NO-SOURCE
> Task :unityLibrary:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:generateDebugBuildConfig UP-TO-DATE
> Task :launcher:generateDebugBuildConfig UP-TO-DATE
> Task :launcher:compileDebugAidl NO-SOURCE
> Task :unityLibrary:generateDebugResValues UP-TO-DATE
> Task :unityLibrary:generateDebugResources UP-TO-DATE
> Task :launcher:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:packageDebugResources UP-TO-DATE
> Task :launcher:mainApkListPersistenceDebug UP-TO-DATE
> Task :launcher:generateDebugResValues UP-TO-DATE
> Task :launcher:generateDebugResources UP-TO-DATE
> Task :unityLibrary:parseDebugLocalResources UP-TO-DATE
> Task :launcher:mergeDebugResources UP-TO-DATE
> Task :launcher:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :launcher:extractDeepLinksDebug UP-TO-DATE
> Task :unityLibrary:javaPreCompileDebug UP-TO-DATE
> Task :unityLibrary:extractDeepLinksDebug UP-TO-DATE
> Task :launcher:mergeDebugShaders UP-TO-DATE
> Task :launcher:compileDebugShaders UP-TO-DATE
> Task :launcher:generateDebugAssets UP-TO-DATE
> Task :launcher:processDebugJavaRes NO-SOURCE
> Task :unityLibrary:compileDebugLibraryResources UP-TO-DATE
> Task :unityLibrary:mergeDebugShaders UP-TO-DATE
> Task :launcher:checkDebugDuplicateClasses UP-TO-DATE
> Task :unityLibrary:compileDebugShaders UP-TO-DATE
> Task :unityLibrary:generateDebugAssets UP-TO-DATE
> Task :launcher:desugarDebugFileDependencies UP-TO-DATE
> Task :launcher:mergeExtDexDebug UP-TO-DATE
> Task :launcher:mergeDebugJniLibFolders UP-TO-DATE
> Task :launcher:validateSigningDebug UP-TO-DATE
> Task :unityLibrary:packageDebugAssets
> Task :unityLibrary:processDebugJavaRes NO-SOURCE
> Task :unityLibrary:bundleLibResDebug UP-TO-DATE
> Task :unityLibrary:mergeDebugJniLibFolders UP-TO-DATE
> Task :unityLibrary:mergeDebugNativeLibs UP-TO-DATE
> Task :unityLibrary:stripDebugDebugSymbols UP-TO-DATE
> Task :unityLibrary:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :unityLibrary:processDebugManifest
> Task :launcher:mergeDebugAssets
> Task :unityLibrary:generateDebugRFile UP-TO-DATE
> Task :unityLibrary:compileDebugJavaWithJavac UP-TO-DATE
> Task :unityLibrary:bundleLibCompileDebug UP-TO-DATE
> Task :unityLibrary:bundleLibRuntimeDebug UP-TO-DATE
> Task :launcher:processDebugManifest
> Task :launcher:javaPreCompileDebug UP-TO-DATE
> Task :launcher:processDebugResources
> Task :launcher:compileDebugJavaWithJavac UP-TO-DATE
> Task :launcher:compileDebugSources UP-TO-DATE
> Task :launcher:mergeDebugJavaResource UP-TO-DATE
> Task :launcher:dexBuilderDebug UP-TO-DATE
> Task :launcher:mergeDexDebug UP-TO-DATE
> Task :launcher:mergeDebugNativeLibs UP-TO-DATE
> Task :launcher:stripDebugDebugSymbols UP-TO-DATE
> Task :launcher:packageDebug FAILED
44 actionable tasks: 6 executed, 38 up-to-date

* What went wrong:
Execution failed for task ':launcher:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Entry name 'AndroidManifest.xml' collided

* 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 10s
0x00007ff7a21a736c (Unity) StackWalker::GetCurrentCallstack
0x00007ff7a21ad509 (Unity) StackWalker::ShowCallstack
0x00007ff7a299f193 (Unity) GetStacktrace
0x00007ff7a38a05ba (Unity) DebugStringToFile
0x00007ff7a233750d (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x000001dcdc330feb (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x000001dcdc330f1b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x000001dcdc330c60 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000001dce46db2e5 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x000001dce46daeab (Mono JIT Code) UnityEditor.Android.GradleInvokationException:ParseAndShowException ()
0x000001dcdc2ad903 (Mono JIT Code) UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext)
0x000001dce378196b (Mono JIT Code) UnityEditor.Android.PostProcessAndroidPlayer:PostProcess (UnityEditor.BuildTarget,string,string,string,string,string,string,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
0x000001dce3780b8b (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
0x000001dce378048a (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
0x000001dce37807b9 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
0x00007ff8906ee640 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke 
0x00007ff890672ad2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke 
0x00007ff89067bb2f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke 
0x00007ff7a20f2be4 (Unity) scripting_method_invoke
0x00007ff7a20ee251 (Unity) ScriptingInvocation::Invoke
0x00007ff7a39b3321 (Unity) CallMono
0x00007ff7a39b991d (Unity) PostprocessPlayer
0x00007ff7a39b57d3 (Unity) DoBuildPlayer_PostBuild
0x00007ff7a39b4370 (Unity) DoBuildPlayer
0x00007ff7a39a9e45 (Unity) BuildPlayer
0x00007ff7a2f88a05 (Unity) BuildPipeline::BuildPlayerInternalNoCheck
0x00007ff7a2f5b5ac (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x000001dc3502616a (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,string[],bool)
0x000001dc350259fb (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x000001dc35022a8b (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x000001dc35022593 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
0x000001dcf197d32b (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
0x000001dcf19668f3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x000001dce7abeb4b (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x000001dbe1baef53 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect)
0x000001dbe1baed03 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect,UnityEngine.Rect)
0x000001dbe1ba0e43 (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x000001dbe1b48320 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x000001dbe1b4746b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x000001dcf5ec523b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x000001dcf5ec50a3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x000001dcf5ec4c2b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x000001dcf5ec4b13 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x000001dbe3092cdb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x000001dbe3082298 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x000001dcf5ec1d7b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001dbe30807ae (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x000001dbe3080343 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001dbe30858c3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x000001dbe30842d3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x000001dbe308423b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x000001dbe30805d3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x000001dbe307fee3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x000001dbe307fd7b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x000001dbe31a87cb (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x000001dbe31a82ab (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x000001dbe31a80af (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x000001dbe31a7feb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x000001dbe31a7e4d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x000001dbe31a7efe (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ff8906ee640 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke 
0x00007ff890672ad2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke 
0x00007ff89067bb2f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke 
0x00007ff7a20f2be4 (Unity) scripting_method_invoke
0x00007ff7a20ee251 (Unity) ScriptingInvocation::Invoke
0x00007ff7a20e8615 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff7a13cb23a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff7a24de0f6 (Unity) GUIView::ProcessRetainedMode
0x00007ff7a29ca8a2 (Unity) GUIView::OnInputEvent
0x00007ff7a24ddfe2 (Unity) GUIView::ProcessInputEvent
0x00007ff7a29cb8c9 (Unity) GUIView::ProcessEventMessages
0x00007ff7a29c5a08 (Unity) GUIView::GUIViewWndProc
0x00007ff8ea0fe858 (USER32) CallWindowProcW
0x00007ff8ea0fe299 (USER32) DispatchMessageW
0x00007ff7a29a4d76 (Unity) MainMessageLoop
0x00007ff7a29a8af6 (Unity) WinMain
0x00007ff7a44d5682 (Unity) __scrt_common_main_seh
0x00007ff8ea2a7034 (KERNEL32) BaseThreadInitThunk
0x00007ff8eafa2651 (ntdll) RtlUserThreadStart
Chethan CV
  • 547
  • 1
  • 7
  • 23
  • I kind of fixed this error when I added android.useNewApkCreator=false to my gradleTemplate.properties file , but when I build my app to run on my android device it doesn't come up.Futhermore when I tried manually to copy and install ,it says can't parse apk – Chethan CV Jun 09 '21 at 04:21

0 Answers0