Error: Program type already present: com.google.gson.FieldAttributes 的解决方法

在app中的build.gradle中加入如下代码,

configurations {
    all*.exclude group: 'com.google.code.gson'
    all*.exclude group: 'com.squareup.okhttp3'
    all*.exclude group: 'com.squareup.okio'
    all*.exclude group: 'com.android.support',module:'support-v13'
}

 如图

原文地址:https://www.cnblogs.com/sea-stream/p/10596873.html