- Home /
The question is answered, right answer was accepted
ClassNotFoundException: com.unity.ads.IUnityAdsShowListener
Hello,
While testing the Ads Package on functionality I encountered a nasty error on an Android Build via Android Logcat.
I hope that the logs can give insight on what is missing or wrong.
In Editor Mode I can view the Preview Editor Ad normally and everything works on that note. But when I build the project and launch it on my Android Device the error messages come and the ad won't start.
2021.05.23 18:12:48.151 28803 28823 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: com.unity3d.ads.IUnityAdsShowListener
2021.05.23 18:12:48.151 28803 28823 Error Unity java.lang.ClassNotFoundException: com.unity3d.ads.IUnityAdsShowListener
2021.05.23 18:12:48.151 28803 28823 Error Unity at java.lang.Class.classForName(Native Method)
2021.05.23 18:12:48.151 28803 28823 Error Unity at java.lang.Class.forName(Class.java:454)
2021.05.23 18:12:48.151 28803 28823 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2021.05.23 18:12:48.151 28803 28823 Error Unity at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
2021.05.23 18:12:48.151 28803 28823 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
2021.05.23 18:12:48.151 28803 28823 Error Unity at android.os.Handler.dispatchMessage(Handler.java:103)
2021.05.23 18:12:48.151 28803 28823 Error Unity at android.os.Looper.loop(Looper.java:214)
2021.05.23 18:12:48.151 28803 28823 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
2021.05.23 18:12:48.151 28803 28823 Error Unity Caused by: java.lang.ClassNotFoundException: com.unity3d.ads.IUnityAdsShowListener
2021.05.23 18:12:48.151 28803 28823 Error Unity ... 8 more
2021.05.23 18:12:48.151 28803 28823 Error Unity at UnityEngine.AndroidJNISafe.CheckException () [0x00096] in :0
2021.05.23 18:12:48.151 28803 28823 Error Unity at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x0000c] in :0
2021.05.23 18:12:48.151 28803 28823 Error Unity at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x0001d] in <401
Answer by mohit19214 · May 24, 2021 at 06:24 AM
@Zanryu this happens when you install unity ads package from package manager. you need to download SDK from unity asset store. for better explanation watch this: https://www.youtube.com/watch?v=OElh7wda4Qc at time 3:21 in this video.
Thank you for this almost basic info. Although it's seems strange that the Package Manager release is so highly different than the Asset Store Release.
Follow this Question
Related Questions
Google Admob (V.6.1.2) crashing Android game on device built with Unity 2020.3.19 1 Answer
Chartboost adds are not showing up on android 0 Answers
Sample of Inner-active plugin for Unity Android does not work 1 Answer
Advertisement.IsReady return false on mobile phone 0 Answers
Ad IsReady problem 2 Answers