cannot be cast to com.google.android.gms.ads.AdView

63 views
Skip to first unread message

Serkan AKALAN

unread,
Mar 10, 2023, 3:52:40 AM3/10/23
to Google Mobile Ads SDK Developers
Hello everyone,
https://github.com/googleads/googleads-mobile-android-examples I would adapt the example found at this url just by using Retrofit. When I set the ITEMS_PER_AD value to 20, it works. When scrolling down, java.lang.ClassCastException at position 20: com.google.android.gms.example.bannerrecyclerviewexample.MenuItem cannot be cast to com.google.android.gms.ads.AdView. What is the reason?

Mobile Ads SDK Forum Advisor

unread,
Mar 10, 2023, 10:39:33 AM3/10/23
to srk...@gmail.com, google-adm...@googlegroups.com

Hello Serkan,

Welcome to Mobile Ads SDK support team. Thank you for reaching out to us.

With regards to your concern, would you be able to provide more context on how you are using the retrofit with our sample apps or with the SDK itself? It would be great if you can share developer documents that would help illustrate your process.

Moreover, for us to have a clear view on your issue, kindly provide the below information:

  • app id
  • ad unit id
  • affected device details (name and version)


You may send the requested details privately via "Reply to Author" button or with the below process.

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=5004Q00002jY4ZpQAK&entry.80707362=00170488

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 Mobile Ads SDK Team


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