Search Unity

UnityEditor.BuildPlayerWindow+BuildMethodException: 11 errors Can Someone Help Me?

Discussion in 'Getting Started' started by Aquazombie, Nov 25, 2020.

  1. Aquazombie

    Aquazombie

    Joined:
    Nov 5, 2020
    Posts:
    11
    I have finnily finished making my game and when I try to build it I get this error UnityEditor.BuildPlayerWindow+BuildMethodException: 11 errors I don't know how to fix it or really anything about it have seen a lot of videos online and it didn't help me any. douse anyone know whats going on and how to fix it? Thank You for any help =)
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Please show the errors :)
     
  3. Aquazombie

    Aquazombie

    Joined:
    Nov 5, 2020
    Posts:
    11
    ok Here They Are

    UnityEditor.BuildPlayerWindow+BuildMethodException: 11 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0027c] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <3b1af5075b0340cfb428dfcef292b2ea>:0
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    Error building Player because scripts had compiler errors


    Library\PackageCache\com.unity.ads@3.4.9\Runtime\Monetization\MonetizationPlatform.cs(172,18): error CS0433: The type 'Purchase' exists in both 'UnityEngine.Advertisements.Android, Version=3.5.1.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null'

    File C:\Users\ZOMBIES\.android\repositories.cfg could not be loaded.

    I think that's what you needed? thank you for the help =)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
    Library\PackageCache\com.unity.ads@3.4.9\Runtime\Monetization\MonetizationPlatform.cs(171,18): error CS0433: The type 'IUnityLifecycleManager' exists in both 'UnityEngine.Advertisements.Android, Version=3.5.1.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null


    Library\PackageCache\com.unity.ads@3.4.9\Runtime\Monetization\AndroidPlacementContentOperations.cs(64,42): error CS0433: The type 'IUnityLifecycleManager' exists in both 'UnityEngine.Advertisements.Android, Version=3.5.1.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null'
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    So not sure how, but it says, you already have UnityEngine.Advertisements assembly somewhere. From the error, I can see you have com.unity.ads package in your packages folder, maybe accidentally you have UnityEngine.Advertisements in the very project itself, if so, remove it, that would fix duplication error.
     
  5. Cej_

    Cej_

    Joined:
    Jun 30, 2022
    Posts:
    1
    Hi, any luck to solve this?