在我的Android應用程序,我需要使用谷歌Analytics(分析)和下面是我的build.gradle文件應用程序的構建提供了錯誤
dependencies {
compile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.google.android.gms:play-services:9.0.1'
compile 'com.google.android.gms:play-services-analytics:9.0.1'
compile 'com.google.code.gson:gson:2.3.1'
compile files('libs/android-mads-4.5.8.jar')
compile files('libs/ksoap2-android-assembly-3.3.0-jar-with-dependencies.jar')
//compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/picasso-2.5.2.jar')
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
}
apply plugin: 'com.google.gms.google-services'
,但我仍然得到以下錯誤
Error:(8, 45) error: package com.google.analytics.tracking.android does not exist
您好,我想這需要被添加到項目層面構建文件,我將它 類路徑「com.android.tools.build:gradle:2.2.0-alpha3」 classpath'com.google.gms:google-services:3.0.0' – beginner
是的,它只在classpath中檢查我發送的鏈接中的其他更改。 – KDeogharkar
我已經做了....我的是一樣的描述在你的和下面的答案的鏈接。但這個問題仍然存在。有時在生成後,我也得到這個錯誤錯誤:執行失敗的任務':transformClassesWithJarMergingForDebug'。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複條目:com/google/android/gms/analytics/internal/Command $ 1.class – beginner