MduSenthil
MduSenthil

Reputation: 2077

How to fix "Failed to resolve com.google.firebase:firebase-ads:9.2.0"?

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?

Upvotes: 14

Views: 6311

Answers (5)

Ali Bdeir
Ali Bdeir

Reputation: 4365

Looks like you have a typo with the version.


Replace compile 'com.google.firebase:firebase-ads:9.2.0' with compile 'com.google.firebase:firebase-ads:9.0.2'


Update: 9.2.0 is a valid version. You might be able to use 9.2.0, but you have to update Google Services from the SDK Manager. If that doesn't work, then stick with 9.0.2 until we find something.

Upvotes: 1

m43x
m43x

Reputation: 235

Updating google services in SDK Manager helped me.

Upvotes: 1

Priyank Patel
Priyank Patel

Reputation: 1

Update all your google services version from 9.0.2 to 9.2.0.

Upvotes: 0

icastell
icastell

Reputation: 3605

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.

Upvotes: 11

Michael Jones
Michael Jones

Reputation: 2282

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! :)

Upvotes: 2

Related Questions