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

查看:268
本文介绍了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

我的gradle代码:

My gradle code:

  ...
    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?

推荐答案

检查应用程序设置中的编译版本。我将其更改为与我用我的项目构建的API级别兼容的版本。
这解决了我的问题。

Check the compile version in your App settings. I changed it to the version compatible with the API level I've built my project with. This fixed the problem for me.

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

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