当 Android Studio 报错: Program type already present: com.google.gson.FieldNamingPolicy$5 或者 Program type already present: com.google.gson.FieldAttributes 可能的原因是主项目 app 和 module 分别引入了 Gson,导致包重复。 解决方法: 在 app 的 build.gradle 中加入代码: configurations { all*.exclude group: 'com.google.code.gson' }