我正在开发一个项目,其中我使用TagManager和Datalayer类来实现GTA和增强的电子商务,我在build.gradle中使用'com.google.android.gms:play-services-base:12.0.1'和android studio版本3.0.1显示我将它更新到15.0.0,当我更改其版本和同步项目时,它现在给我错误:
错误:包com.google.android.gms.tagmanager不存在
我更新了android studio 3.1.1并使用了构建工具版本27,但它无法解决这个问题.它仍然显示相同的错误消息.
build.gradle信息:
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'
Run Code Online (Sandbox Code Playgroud)
我的activity类中存在此问题的一段代码:
import com.google.android.gms.tagmanager.DataLayer;
import com.google.android.gms.tagmanager.TagManager;
Run Code Online (Sandbox Code Playgroud)
我无法理解这个更新15.0.0如何没有tagmanager和datalayer.
android google-tag-manager google-datalayer enhanced-ecommerce android-studio-3.0
android ×1