Hello everyone, I am posting here to seek help regarding the Advertisement Legacy package in Unity. I have searched heavily on this issue and the fixes/errors are not specific to me. Banner ads, and now rewarded ads have been implemented in my project, and work in the test mode in the Unity Editor, however when I build, I get errors on Ad Initialization, specifically:
Error | Unity | Initializing Unity Ads.
Error | Unity | (#0-#3) 0x727… (libunity.so) ? 0x0
Error | Unity | (#4-#11) 0x727… (libil2cpp.so) ? 0x0
Error | Unity | (#12-#25) 0x727… (libunity.so) ? 0x0
Error | Unity | (#26) 0x727… etc…
Error | Unity | Java.lang.ClassNotFoundException: com.unity3d.services.banners.IUnityBannerListener
Followed by another 24 similar errors.
Advertisement Legacy version is 4.12.0. Ad/Game IDs are correct and Test Mode is off. I figured I’d try here, finally, before just updating to the newer advertisement system.
This is a known issue… I didn’t observe any solution in multiple posts in Discussions.
Alternative solution:
Unity forces developers to integrate Unity Ads via Unity LevelPlay (New Standard in Unity). The Unity Ads as Unity package will not be updated. It was announced a long time ago.
I guess Legacy Ads 4.12 is the latest bounty is in updating this Unity package that can have bugs.
I’m glad it’s not just me. I look forward to trying the new ad system.
Try to clear all ads related stuff in your project manually before installing/ updating the new version. Source.
Hello,
Thank you for bringing this issue up. We’re aware of this issue and investigating it.
Our thought is that this problem comes from a third-party plugin such as EDM4U (External Dependency Manager for Unity).
Can you try to use Custom Main Gradle Template?
Hi, there. Thank you for this suggestion, I tried it with banner ads (Had to put them back in) and it did not work. I’m getting the same:
2024/09/12 19:06:29.539 28207 28236 Error Unity java.lang.ClassNotFoundException: com.unity3d.services.banners.IUnityBannerListener
Thanks for checking that.
The following thread could be related and shows a workaround.
I hope this will help you. Our engineering team is still working on this issue, I will keep posting here if I get an update.
Are there any updates? I have tried every possible solution but still getting:
Error Unity Initializing Unity Ads.
Error Unity java.lang.ClassNotFoundException: com.unity3d.services.banners.IUnityBannerListener
Even without banner ads I am getting this error. Also any trick solution could help since I am stuck with this for days. I opened a new project and included only Advertisement Legacy sample to test and still this error… Unity version 2022.3.22f1, Advertisement Legacy version 4.12.0.
The issue persists. None of the solutions worked, and I’ve tested it on both Unity 2022.3 and Unity 6.
Any recommendations on how to fix this problem?
Your last solution would be to downgrade to 4.4.2:
1 - window > package manager
2 - press plus icon (+)
3 - add package by name
4 - com.unity.ads > 4.4.2
Downgrading is never recommended but here we are…
yes … was the only solution for me ![]()
Problem Fixed
Mm Cool . Don’t worry because it casue some conflicts in your package if you are using unity legacy remove the services core packege because it is not need for unity ad legacy
Go to the package manager > services core > click remove and test once ![]()
![]()
sometime
(If not work Don’t hesitate to stop your motive to search dor solution ) 《《 if you solve tell clearly how is it.
This solution works as of 3/31/25
I also choose this solution at the end, downgrading to 4.4.2 helped
The root of the problem is that MobileDependencyResolver is not compatible. Developers who encounter this problem can try this workaround:
- Use a Unity project with Ads Legacy package installed
- Delete the MobileDependencyResolver
- Download the .zip file from the Sept 18 2024 release
- Add the external-dependency-manager-1.2.183.unitypackage to the project
- Run External Dependency Manager → Android Resolver → Resolve
