I am using latest version of flutter 3.7.2
My app has google ads and firebase dependency for which is use following pubs latest versions
admob_flutter:
firebase_messaging:
firebase_core:
Everthing is working perfect but when I have uploaded app on playstore it gives me following error
For solution of above warning i done the change in app level gradle file and following line
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-ads:21.5.0' // this line added for solution
implementation platform('com.google.firebase:firebase-bom:29.3.0')
implementation 'com.google.firebase:firebase-analytics'
}
but after adding above line my firebase stopped working it crash when run app with following error.
NOTE: I have tried flutter clean, reinstall app, flutter pub upgrade
everything is up-to date. Also when i change line implementation
‘com.google.android.gms:play-services-ads:21.5.0’ to implementation
‘com.google.android.gms:play-services-ads:19.2.0’ everything is
working perfect
2
Answers
you help me with the part that you say works with only ‘com.google.android.gms:play-services-ads:19.2.0’ and I had the same problem but trying to solve it by changing this line:
you try to change firebase-ads:19.1.0 to 21.5.0 and it will let you use
implementation ‘com.google.android.gms:play-services-ads:21.5.0’
It works for me, hope helps you.
If you are using ‘admob_flutter’ and update to ‘com.google.android.gms:play-services-ads:2.50.0’ you couldn’t use Admob, this is because ‘admob_flutter’ does not support ‘play-services-ads:2.50.0’.
In this case, I used ‘google_mobile_ads 2.3.0’ it’s verified and published by ‘google.dev
https://pub.dev/packages/google_mobile_ads