java.lang.ClassNotFoundException: com.google.android.gms.ads.MobileAds

227 views
Skip to first unread message

mong...@gmail.com

unread,
Aug 9, 2018, 12:06:26 AM8/9/18
to Google Mobile Ads SDK Developers
i want to put interstitialAd in my game made by unity. 
but it doesn't work.
 
1. logcat says.

dd.png



2. my code in game.

sdf.png


mobileadssdk-a...@google.com

unread,
Aug 9, 2018, 4:14:37 AM8/9/18
to mong...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for providing the error logs captured as well as snippets of your code implementation.

There's nothing out of the ordinary with your code implementation. On the other hand, the error captured seems to suggest that the Google Mobile Ads Android dependencies were not successfully imported into your Unity project.

Could you check if you were able to follow the instructions for importing the Google Mobile Ads Unity plugin? Could you try executing dependency resolution by going to Assets > Play Services Resolver > Android Resolver > Resolve in the Unity editor then see if the error persists?

In addition, is it possible for you to build and run our HelloWorld sample app (as is) and see if you encounter the same build error?

Regards,
Ivan Bautista
Mobile Ads SDK Team





--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/6c86e09b-5d37-4b55-876f-858207c82f61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mong...@gmail.com

unread,
Aug 10, 2018, 5:00:58 AM8/10/18
to Google Mobile Ads SDK Developers
I did all you recommend even helloWorld sample. in sameple, logcat said same error. classNotFoundException for Mobileads..

2018년 8월 9일 목요일 오후 5시 14분 37초 UTC+9, mobileadssdk-a...@google.com 님의 말:

mobileadssdk-a...@google.com

unread,
Aug 13, 2018, 3:23:42 AM8/13/18
to mong...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for testing it out with our sample app and for following our guide.

Based on past experiences with other publishers, could you check the following items to help us narrow down the root cause of the issue?
  • The latest GMA plugin should have the latest version of the Google Mobile Ads SDK (15.0.1 as of this writing) specified in the GoogleMobileAdsDependencies file. However, for double checking, could you check the dependencies file of the GMA plugin you imported to your project and see if it is indeed using the latest SDK version?
  • Are you using the Minify option of the Unity Gradle build system? If so, then make sure that you add in the ProGuard config file (proguard-user.txt) the ProGuard rules to skip running ProGuard on GMA SDK specific classes like the example mentioned here. The file should be located in Assets > Plugins > Android directory of your project.
For us to have a closer look on our end, could you provide to us privately (using Reply privately to author option) the Unity project you are having issues building on your end?

On the other hand, could you try building this modified sample Unity project (with the latest GMA plugin imported) as is on your end, then see if you reproduce the same build issue?

Regards,
Ivan Bautista
Mobile Ads SDK Team



On 08/10/18 17:00:58 mong...@gmail.com wrote:
I did all you recommend even helloWorld sample. in sameple, logcat said same error. classNotFoundException for Mobileads..

2018년 8월 9일 목요일 오후 5시 14분 37초 UTC+9, mobileadssdk-a...@google.com 님의 말:
Hi,

Thank you for providing the error logs captured as well as snippets of your code implementation.

There's nothing out of the ordinary with your code implementation. On the other hand, the error captured seems to suggest that the Google Mobile Ads Android dependencies were not successfully imported into your Unity project.

Could you check if you were able to follow the instructions for importing the Google Mobile Ads Unity plugin? Could you try executing dependency resolution by going to Assets > Play Services Resolver > Android Resolver > Resolve in the Unity editor then see if the error persists?

In addition, is it possible for you to build and run our HelloWorld sample app (as is) and see if you encounter the same build error?

Regards,
Ivan Bautista
Mobile Ads SDK Team





On 08/09/18 12:06:26 mong...@gmail.com wrote:
i want to put interstitialAd in my game made by unity. 
but it doesn't work.
 
1. logcat says.

dd.png



2. my code in game.

sdf.png


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages