AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener

254 views
Skip to first unread message

Harneet Singh Anand

unread,
May 31, 2020, 2:43:32 PM5/31/20
to Google Mobile Ads SDK Developers
Sir i am using GoogleMobileAds-v5.1.0.unitypackage getting this error java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener
,I am using Unity 2019.3.15 banner,reward ad not showing Please help

Thank You
Screenshot 2020-06-01 at 12.07.12 AM.png

Mobile Ads SDK Forum Advisor Prod

unread,
May 31, 2020, 10:32:13 PM5/31/20
to hsa....@gmail.com, google-adm...@googlegroups.com

Hi Harneet,

 

Thank you for reaching out to us.

 

Upon investigating, this seems to be more of a code stripping error related to Unity rather than an Android one. If you have ProGuard activated in your Unity project, could you try adding the following to your ProGuard file?

-keep public class com.google.android.gms.ads.** {

public *;

}

 

-keep public class com.google.ads.** {

public *;

}

 

If the issue persists despite the above, could you then kindly provide the details below (via Reply privately to author) so that I can further investigate the issue?

  • Copy of your sample project (replicating the issue)
  • Steps to replicate the issue

 

You may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size, then send it to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable link via Reply privately to author.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5004Q1ztGn8:ref

Harneet Singh Anand

unread,
Jun 1, 2020, 2:43:32 PM6/1/20
to Google Mobile Ads SDK Developers
Sir progaurd is off. It's not working in main application and then I made basic app to test then also it's not working, I will send you project. Thankyou very much for the response

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 1, 2020, 3:41:39 PM6/1/20
to hsa....@gmail.com, google-adm...@googlegroups.com
Hi Harneet,

I work with Ziv and will try to assist you. I just made a test app with Unity 2019.3.15f1 using GoogleMobileAds-v5.1.0.unitypackage with a test banner ad following instructions here - https://developers.google.com/admob/unity/quick-start and then here - https://developers.google.com/admob/unity/banner and the banner ad showed on a Xiaomi Mi a2 Android 10 phone and the logcat didn't show an error for OnInitializationCompleteListener. We are looking forward to seeing how you implemented the SDK in your sample app and testing it. 

Kind regards,
Aryeh Baker

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 7, 2020, 8:31:04 PM6/7/20
to hsa....@gmail.com, google-adm...@googlegroups.com

Hi Harneet,

 

It seems that we did not receive your sample project on our end. Could you kindly resend it again via Reply privately to author?

 

Regards,

Ziv Yves Sanchez

Reply all
Reply to author
Forward
0 new messages