Bug: for AdView, it says I can't set the adSize anymore, as opposed to the docs

198 views
Skip to first unread message

Liran Barsisa

unread,
Jun 1, 2022, 4:18:11 AM6/1/22
to Google Mobile Ads SDK Developers
https://issuetracker.google.com/issues/234223551

It says here:
https://developers.google.com/admob/android/banner#add_adview

That I can use it as such:

val adView = AdView(this)
adView.adSize = AdSize.BANNER

However, on the newest version, it doesn't let me, as it says that adSize can't be changed.

    implementation 'com.google.android.gms:play-services-ads:21.0.0'  

2022-05-29_12-27-52.png

Mobile Ads SDK Forum Advisor

unread,
Jun 1, 2022, 10:43:42 AM6/1/22
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Thank you for reaching out to us.

For us to better check this, can you provide us with your sample app project? It will help us to check your implementation as well.

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=5004Q00002bagpvQAA&entry.80707362=00109653
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
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2bagpv:ref
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Liran Barsisa

unread,
Jun 3, 2022, 3:25:16 PM6/3/22
to Google Mobile Ads SDK Developers
What's wrong with what I already wrote? It's just 2 lines of code...
For some reason this forum doesn't let me attach files here, and sadly Drive still doesn't have a timeout of deletion (file stays forever), so here instead:
https://ufile.io/1rbqe9au

Liran Barsisa

unread,
Jun 3, 2022, 3:27:29 PM6/3/22
to Google Mobile Ads SDK Developers
I also tried your link. For some reason I can't find the attachment and also can't edit the comment that I've just written.
This forum is very buggy. 
Hope you will be fine with the link I've provided instead

itzno...@gmail.com

unread,
Jun 5, 2022, 9:23:17 AM6/5/22
to Google Mobile Ads SDK Developers
The doc for Kotlin is not updated perhaps.
It seems like the variable `adSize` is now get only.
You can simply use adView.setAdSize(AdSize.SMART_BANNER).

Liran Barsisa

unread,
Jun 5, 2022, 11:53:59 AM6/5/22
to Google Mobile Ads SDK Developers
I know. That's the bug. You need to update it

Mobile Ads SDK Forum Advisor

unread,
Jun 6, 2022, 9:50:05 AM6/6/22
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Thank you for your response.

Let me share this to the rest of the team so that they can update the documentation about this. You may keep an eye to our blog or release notes for any future updates on this.

Mobile Ads SDK Forum Advisor

unread,
Jun 6, 2022, 9:50:30 AM6/6/22
to itzno...@gmail.com, google-adm...@googlegroups.com

Hi Itznotabug,

Thank you for sharing your insight on this. If you have any other concerns related to the implementation of Google Mobile Ads SDK, kindly provide us the details. We'll be happy to assist you.

Reply all
Reply to author
Forward
0 new messages