最近在接入Bmob,发现用studio加远程仓库这种方式无法找包APK成功,原因是Bmob SDK包里包含的gson、okhttp、okio、rxjava、rxandroid这些依赖包与项目里这些包重复。
解决方法忽略项目中的包,使用用Bmob的包 (无奈,暂时未找到怎么忽略Bmob SDK内的包@_@):
android {
...
configurations {
...
all*.exclude group: 'com.google.code.gson', module: 'gson'
all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
all*.exclude group: 'com.squareup.okio', module: 'okio'
all*.exclude group: 'io.reactivex', module: 'rxjava'
all*.exclude group: 'io.reactivex', module: 'rxandroid'
}
}
网友评论