Dayanand Lande
Dayanand Lande

Reputation: 211

Getting package com.google.android.gms.ads.identifier does not exist, while try to get google advertising id

I am fetching Google advertising id in my application, I have updated my android studio and android SDK.

minSdkVersion 15
targetSdkVersion 27
Current gradle version is : 3.1.3
Google services is : 3.0.0
Google Play Services Version : 11.8.0
android Support Libraries Version : 27.1.1

While fetching GAID, I am getting following error

error: package com.google.android.gms.ads.identifier does not exist

Not able to find AdvertisingIdClient class.

I am bit stuck here, Please help me. Thank you.

Upvotes: 0

Views: 5230

Answers (2)

Adelodun Damilare
Adelodun Damilare

Reputation: 99

The solution here worked for me https://www.solutionfactory.in/posts/error-package-com-google-android-gms-ads-solved

adding this to my gradle build file particularly solved my problem.

implementation 'com.google.android.gms:play-services-ads:15.0.0'

Upvotes: 5

Hani
Hani

Reputation: 121

Seems that google has moved it to ads play services!

You have to add implementation com.google.android.gms:play-services-ads:15.0.1 to your dependencies

Upvotes: 4

Related Questions