【问题标题】:How to remove duplicated Unity Ads package?如何删除重复的 Unity Ads 包?
【发布时间】:2022-12-15 06:52:53
【问题描述】:
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)

它说

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:)

我搜索了这个问题,我发现这是因为我的 Unity Ads 包被复制了。但我不知道如何只删除一个重复项。

顺便说一句,它在添加击键之前工作得很好。

【问题讨论】:

    标签: android unity3d build keystroke unityads


    【解决方案1】:

    也许尝试禁用统一广告服务或通过包管理器卸载包

    【讨论】:

    • 它只会给出另一个错误,说找不到。
    • 我设法按照您在我的回答中看到的方式解决了它。
    • 您的答案可以通过其他支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写出好的答案的信息in the help center
    【解决方案2】:

    我设法通过单击 Assets/Mobile Dependency Resolver/Android resolver/Delete Resolved Libraries 来修复它

    然后我再次构建。

    【讨论】:

      猜你喜欢
      • 2012-06-16
      • 1970-01-01
      • 2020-03-31
      • 1970-01-01
      • 1970-01-01
      • 2020-05-06
      • 2014-01-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多