Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: package com.google.android.gms.tagmanager does not exist

I am working on a project in which i have used TagManager and Datalayer class for the implementation of GTA and enhanced ecommerce and i am using 'com.google.android.gms:play-services-base:12.0.1' in build.gradle and android studio version 3.0.1 is showing me to update it to 15.0.0 and when i changed its version and sync project it is now giving me error:

error: package com.google.android.gms.tagmanager does not exist

I took update of android studio 3.1.1 and using build tool version 27, but it is making no effect to correct this problem. It is still showing same error message.

build.gradle info:

compileSdkVersion 27
buildToolsVersion "27.0.2"

minSdkVersion 16
targetSdkVersion 27

compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:customtabs:27.1.1'

compile 'com.google.android.gms:play-services-auth:15.0.0'
compile 'com.google.android.gms:play-services-base:15.0.0'
compile 'com.google.android.gms:play-services-gcm:15.0.0'
compile 'com.google.android.gms:play-services-analytics:15.0.0'

Piece of code from my activity class in which this problem exist:

import com.google.android.gms.tagmanager.DataLayer;
import com.google.android.gms.tagmanager.TagManager;

I cannot understand how this update 15.0.0 doesn't have tagmanager and datalayer in it.

like image 688
ConceptSpecs Avatar asked Nov 14 '25 23:11

ConceptSpecs


1 Answers

Add this to your gradle :

compile "com.google.android.gms:play-services-tagmanager:15.0.0

Hope this helps!

like image 156
Shubham Avatar answered Nov 17 '25 19:11

Shubham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!