build.gradle file:
android {
compileSdkVersion 22
buildToolsVersion \"22.0.1\"
defaultConfig {
applicationId \"xxxxx.com.myapp\"
Try removing the following from your dependencies:
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/libGoogleAnalyticsServices.jar')
If you look here, the Analytics API is already built into Google play services, so the two are conflicting.
Sometimes this build failed error occures due to multidex problem. As per looking into your build script it does not seems that you need multidex enabling ture. But still you can try this because I can not say much just seeing your gradle build script.Use
defaultConfig {
applicationId "xxxxx.com.myapp"
minSdkVersion 9
targetSdkVersion 22
versionCode 3
versionName "1.2"
// enable Mutidex.
multiDexEnabled true
}
You are including libGoogleAnalyticsServices.jar
twice. Based in the path, it will be include by the following line (which includes all jars in the libs
directory) --
compile fileTree(dir: 'libs', include: ['*.jar'])
remove this line to avoid including the lib twice --
compile files('libs/libGoogleAnalyticsServices.jar')