1

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:

http://pastebin.com/GG7Pu7iu

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

Mediana
  • 11
  • 1
  • possible duplicate of http://stackoverflow.com/questions/24462128/error-retrieving-parent-for-item-android-studio and http://stackoverflow.com/questions/32243847/how-can-i-downgrade-a-library-in-android-studio-from-api-23-to-api-19 – abielita Feb 19 '16 at 05:44

0 Answers0