Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Swithced from Google Admob to Unity Ads and Errors Showed Up

Discussion in 'Unity Ads & User Acquisition' started by CoolCosmos, Oct 21, 2020.

  1. CoolCosmos

    CoolCosmos

    Joined:
    Nov 21, 2016
    Posts:
    247
    Hi guys, I have switched from admob to unity ads and some kind of errors showed up. I don't even know what they are meaning. I need help to solve them.

    I'm looking forward to see your replies...

    build failure.png
    error.png

    java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules classes.jar :)UnityAds:) and classes.jar :)unity-ads:)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. CoolCosmos

    CoolCosmos

    Joined:
    Nov 21, 2016
    Posts:
    247
    I have found the solution for errors. It's not about switching admob to unity ads. The reason is i have downloaded "Unity Monetization" from Asset store and Enabled "Ads Service" by Window/General/Services.

    If you do both then it will cause errors as there will be two Ads Sdk. So you have to disable one of them to get rid of errors. I disabled the Ads Service by Editor. So they are gone!

    I would like to thank the one who shared the solution on the link below! :)

    https://forum.unity.com/threads/how...ge-package-manager-or-services-window.699005/