Ich versuche google analitics meiner App hinzufügen, aber ich bekomme Fehler in build.gradle:Google Play-Dienste GCM
Error: Execution failed for task ':app:mergeProductionDebugResources'.
\app\build\generated\res\google-services\production\debug\xml\global_tracker.xml: Error: Duplicate resources
aber die falsche in meinem Code: Dies ist meine App-Ebene gradle android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('src/main/java/libs/gson-2.2.4.jar')
compile files('src/main/java/libs/quickblox-android-sdk-chat-2.5.1.jar')
compile files('src/main/java/libs/quickblox-android-sdk-content-2.5.1.jar')
compile files('src/main/java/libs/quickblox-android-sdk-core-2.5.1.jar')
compile files('src/main/java/libs/quickblox-android-sdk-messages-2.5.1.jar')
compile files('src/main/java/libs/bugsense-3.5.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.github.siyamed:android-shape-imageview:[email protected]'
compile 'com.squareup.picasso:picasso:2.5.2'
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
compile 'com.android.support:support-v4:23.+'
compile 'com.android.support:design:23.+'
compile "com.splunk.mint:mint:5.0.0"
compile 'com.google.android.gms:play-services-analytics:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
}
und das ist meine Projektebene gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
Edit: wenn ich entfernen global_tracker.xml die runOnUiThread in:
import static com.google.android.gms.internal.zzir.runOnUiThread;
nicht wissen !!!
Sie sollten nicht sowohl das vollständige Modul für die Spieldienste als auch die spezifischen hinzufügen. Behalte einfach play-services-auth und play-services-analytics wenn du nur diese 2 brauchst und verliere die 'compile'-Datei com.google.android.gms: play-services: 9.0.0'' – gitter
Kann sein, indem du diese Zeile entfernst: compile 'com.google.android.gms: play-services: 9.0.0' – AnixPasBesoin