0

Пытаюсь настроить google аналитику, по инструкции https://developers.google.com/analytics/devguides/collection/android/v4/?hl=ru

Файл build.gradle(Module:app)

apply plugin: 'com.android.application'


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "su.worldbest.dictum"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 2
        versionName "1.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.jjoe64:graphview:4.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile "com.daimajia.swipelayout:library:1.2.0@aar"
    compile 'com.github.asne:asne-facebook:0.3.3'
    compile 'com.github.asne:asne-googleplus:0.3.3'
    compile 'com.github.asne:asne-instagram:0.3.3'
    compile 'com.github.asne:asne-vk:0.3.3'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.google.android.gms:play-services-analytics:8.1.0'
}

apply plugin: 'com.google.gms.google-services'

Файл build.gradle(project)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.google.gms:google-services:1.4.0-beta3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

Добавил строчки, все как по инструкции. Вылетает ошибка: Error:Execution failed for task ':app:processDebugResources'.

Error: more than one library with package name 'com.google.android.gms'

С таким именем только одна библиотека. Что делать?

1 ответ 1

1

Скорее всего, это происходит из-за наличия зависимости от в gradle файле одной из подключённых вами сторонних библиотек.

Так что вам, по идее, достаточно просто убрать избыточную строку с загрузкой библиотеки аналитики.

Ваш ответ

Нажимая на кнопку «Отправить ответ», вы соглашаетесь с нашими условиями использования и подтверждаете, что прочитали и поняли наши политику конфиденциальности и нормы поведения.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.