当我尝试编译代码时,Android Studio 3.0.1 出现以下错误
Error:Program type already present: com.squareup.picasso.Action$RequestWeakReference
我的毕业代码:
...
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:support-vector-drawable:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.1.0-beta4'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-ads:11.8.0'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.google.android.gms:play-services:11.8.0'
compile 'com.squareup.picasso:picasso:2.5.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
如何修复我的 gradle 脚本以修复错误?
最佳答案
将此添加到您的模块 build.gradle 文件中
configurations.all {exclude group: 'com.android.support', module: 'support-v13'}
https://stackoverflow.com/questions/48351721/
相关文章:
android - 使用 log4j 更新 Android Studio 后 gradle 构建出错
Maven - 如何从一个项目构建多个独立的 Maven 项目
r - 关于 .Rbuildignore 正确使用 devtools 和/或 RStudio
build - 如何在 Mac 上构建和安装 Valgrind?
eclipse - 项目 XXX 在其构建路径上没有任何 GWT SDK
java - 构建失败 java.lang.OutOfMemoryError : Java heap
iphone - Xcode:基于架构的条件build设置(设备(ARM)与模拟器(i386))
visual-studio-2010 - 项目引用和项目依赖有什么区别?