Ads don't work when testing on android phone (Unity)

160 views
Skip to first unread message

Eddie Marrero Jr.

unread,
Sep 16, 2022, 12:12:27 AM9/16/22
to Google Mobile Ads SDK Developers
Hi,
When I first downloaded and setup my ads, they were working fine on my phone. Now however they seem throw an error of not being able to initialize. Recently my app was just published to the google play store and I've gone through the process of setting up the app in admob and changing the unit IDs. While in my Unity editor things work fine, it's a different story for my phone and now using my actual unit Ids or the test ones, I can't get things to work. (I've tried uninstalling and reinstalling admob and following the setup guide a couple times now)

2022/09/16 00:05:37.335 5155 5203 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener
2022/09/16 00:05:37.335 5155 5203 Error Unity java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener
2022/09/16 00:05:37.335 5155 5203 Error Unity     at java.lang.Class.classForName(Native Method)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at java.lang.Class.forName(Class.java:453)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at android.os.Handler.dispatchMessage(Handler.java:102)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at android.os.Looper.loop(Looper.java:214)
2022/09/16 00:05:37.335 5155 5203 Error Unity     at com.unity3d.player.UnityPlayer$e.run(Unknown Source:24)
2022/09/16 00:05:37.335 5155 5203 Error Unity Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.initialization.OnInitializationCompleteListener" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.UniversalPhoenixGroup.HighFlyerReal-GSN-MrE9QR6D6xGvzRs23A==/base.apk"],nativeLibra

Mobile Ads SDK Forum Advisor

unread,
Sep 16, 2022, 9:20:55 AM9/16/22
to jrem...@gmail.com, google-adm...@googlegroups.com
Hi Eddie,
 

Thank you for reaching out to us.

 

Could you please confirm if the same issue occurs using our demo units? Can you provide us the following details below privately? You can provide the following details via Reply privately to author option or directly provide it to the link below.

 

  • Sample app project
  • Steps to replicate
  • SDK version
  • App ID

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002ePBVeQAO&entry.80707362=00125508

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Regards,

Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2ePBVe:ref
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Sep 26, 2022, 2:17:26 PM9/26/22
to jrem...@gmail.com, google-adm...@googlegroups.com

Hi Eddie,

 

This error is caused by lack of Android dependencies. Please run the external dependency manager to resolve android dependencies.

 

From the Unity asset menu :

 

` Assets > External Dependency Manager > Android Settings > Force Resolve`

 

Hope this helps,

Nick



ref:_00D1U1174p._5004Q2ePBVe:ref
Reply all
Reply to author
Forward
0 new messages