Android Studio - 错误:程序类型已存在 [英] Android Studio - Error:Program type already present

查看:36
本文介绍了Android Studio - 错误:程序类型已存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试编译代码时,Android Studio 3.0.1 出现以下错误

When I try to compile the code, the following error appears on 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 脚本以修复错误?

How do I fix my gradle script to fix the error?

推荐答案

将此添加到您的模块 build.gradle 文件

Add this to your module build.gradle file

  configurations.all {exclude group: 'com.android.support', module: 'support-v13'}

这篇关于Android Studio - 错误:程序类型已存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆