架包与so库冲突
一.架包冲突
常见冲突的架包为okhttp、okio、glide、gson、zip4j等。
以glide为例:
报错信息:
java.lang.NoSuchMethodError No virtual method placeholder(I)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/com.sdym.jinlixuexi-THEnfkL_rUo8HozNpZ2cGw==/base.apk)方案一:
将项目中各个引入相同库的版本改为一致。
方案二:
排除掉多场景SDK中的库,导入项目中需要的版本,如下:
api('net.polyv.android:polyvSDKLiveScenes:1.10.8') {
exclude group:'com.github.bumptech.glide',module:'glide'
}
implementation 'com.github.bumptech.glide:okhttp3-integration:xx.xx.xx'二.so库冲突
常见的so库冲突为libc++_shared.so库
解决方案:
Last updated
Was this helpful?