I've just ported a legacy codebase from Eclipse/ADT to Android Studio. Process went quite fine, app is compiling and running without errors.
Now I'm trying to add Google Play Services (in order to use Analytics) to the app. I'm following the guide https://developers.google.com/analytics/devguides/collection/android/v4/ and I've added the compile instruction in build.gradle.
When I add the file google-services.json
and try to compile, I receive an error related to the intermediate build generation for AppCompat and Material Design.
This is the error I receive then I do a gradle clean
:
This is my app's build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "23"
defaultConfig {
applicationId "com.mediana.myapp"
minSdkVersion 16
targetSdkVersion 19
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
debug {
minifyEnabled false
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt' // will not include NOTICE file
exclude 'META-INF/LICENSE.txt' // will not include LICENSE file
}
}
dependencies {
compile files('libs/commons-codec-1.7.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/crittercism_v4_1_0.jar')
compile files('libs/svgAndroid2-src.3Jan2014.jar')
compile files('libs/gcm.jar')
compile files('libs/gson-2.2.4.jar')
compile 'com.android.support:appcompat-v7:19.+'
compile 'com.android.support:gridlayout-v7:19.+'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
}
apply plugin: 'com.google.gms.google-services'
I'll provide anything you need Thanks in advance