Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 417
MduSenthil Avatar asked Jun 30 '16 12:06

MduSenthil


2 Answers

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.

like image 66
icastell Avatar answered Oct 21 '22 02:10

icastell


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

like image 27
Michael Jones Avatar answered Oct 21 '22 00:10

Michael Jones