Home > OS >  How to remove duplicated Unity Ads package?
How to remove duplicated Unity Ads package?

Time:11-30

Build completed with a result of 'Failed' in 28 seconds (28474 ms) #0 GetStacktrace(int) #1 DebugStringToFile(DebugStringToFileData const&) #2 DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*) #3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object) #4 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:95] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions) #5 (Mono JIT Code) [BuildPlayerWindow.cs:1172] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)

It says 

FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':launcher:checkDebugDuplicateClasses'.
    > 1 exception was raised by workers:
      java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules UnityAds-runtime.jar (:UnityAds:) and com.unity3d.ads.unity-ads-4.4.1-runtime.jar (:com.unity3d.ads.unity-ads-4.4.1:) Duplicate class com.unity3d.ads.IUnityAdsInitializationListener found in modules UnityAds-runtime.jar (:UnityAds:) and com.unity3d.ads.unity-ads-4.4.1-runtime.jar (:com.unity3d.ads.unity-ads-4.4.1:)

I searched up the problem, and I figured it out that it was because my Unity Ads package was duplicated. But I can't figure out how to remove only one of the duplicates.

BTW, it worked perfectly before adding a keystroke.

CodePudding user response:

maybe try to disable the unity ads services or uninstall the package via package manager

CodePudding user response:

I managed to fix it by clicking Assets/Mobile Dependency Resolver/Android resolver/Delete Resolved Libraries

And then I build again.

  • Related