0

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.

droidev
  • 7,352
  • 11
  • 62
  • 94
Dayanand Lande
  • 211
  • 4
  • 23

2 Answers2

5

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'
4

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

regina_fallangi
  • 2,080
  • 2
  • 18
  • 38
Hani
  • 121
  • 1
  • 5