Android Kotlin AdView AdSize: Val Cannot Be Reassigned

[Solved] Android Kotlin AdView AdSize: Val Cannot Be Reassigned | Kotlin - Code Explorer | yomemimo.com
Question : Android Kotlin - AdView adSize: val cannot be reassigned

Answered by : abdullah-0kvpuik7ilzv

Admob 21.0.0 changed the way to set ad size directly. You can use the setAdSize method.
MobileAds.initialize(this) { }
val adViewBottom = AdView(this)
adViewBottom.setAdSize(AdSize.BANNER)

Source : | Last Update : Fri, 03 Jun 22

Answers related to Android Kotlin AdView adSize: val cannot be reassigned

Code Explorer Popular Question For Kotlin