I have tried to integrate Admob Ads. The very first step is to add these statements to build.gradle
.
Project Level
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}
Module level:
dependencies {
compile 'com.google.firebase:firebase-ads:9.2.0'
}
apply plugin: 'com.google.gms.google-services'
But when synced getting
Failed to resolve: com.google.firebase:firebase-ads:9.2.0
How can I integrate these advertisements?
You have to update your Google Play Service to the last version, currently is 31, also your Google Repository must be the last too, now is 29.
I just integrated Firebase analytics as well. I had the same problem though! What seems to fix the problem is changing compile 'com.google.firebase:firebase-core:9.2.0'
to compile 'com.google.firebase:firebase-core:9.0.2'
. Basically the 9.2.0
should be 9.0.2
. I was using this tutorial, and it said to use 9.2.0
. I am assuming either the tutorial has a typo or something needs to be updated. This will work though! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With