我试图将google添加到我的应用程序中,但在build.gradle中出现了错误:
Error: Execution failed for task ':app:mergeProductionDebugResources'.
\app\build\generated\res\google-services\production\debug\xml\global_tracker.xml: Error: Duplicate resources
但是我的代码错了:这是我的应用程序级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:0.9.+@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
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'
}
这是我的项目级别等级:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
编辑:当我删除global_tracker.xml runOnUiThread in:
import static com.google.android.gms.internal.zzir.runOnUiThread;
不知道!
发布于 2017-01-15 09:31:48
从xml文件夹中删除global_tracker.xml,因为google插件将在构建应用程序时自动添加google-services.json配置文件中的所有所需数据。
https://stackoverflow.com/questions/41659534
复制相似问题