近期项目需要更新友盟的sdk
更新为
implementation'com.umeng.umsdk:common:2.1.0'
//分享SDK
implementation'com.umeng.umsdk:share-core:6.9.6'
implementation'com.umeng.umsdk:share-qq:6.9.6'
implementation'com.umeng.umsdk:share-wx:6.9.6'
implementation'com.umeng.umsdk:share-sina:6.9.6'
implementation'com.umeng.umsdk:share-board:6.9.6'
报错
java.lang.NoSuchFieldError: No field umDebugLog of type Lcom/umeng/commonsdk/debug/UMDebugLog; in class Lcom/umeng/commonsdk/UMConfigure; or its superclasses (declaration of 'com.umeng.commonsdk.UMConfigure' appears in /data/app/com.easypass.partner-1bMTwGaOeD2VG3FEAS8TgQ==/base.apk!classes5.dex)
解决方法:
把项目中的所有友盟的sdk全部更新到最新
原因:
是这样的,基础库是通用的,由于您原本的分享sdk的需要更新到2.1.0的基础库,而这个基础库无法适配低版本的推送和统计所以出现了这个问题
关键步骤:官网的文档的sdk版本不是最新的。
common:2.1.0 对应 push为6.0.1 ,统计为8.1.3, share为6.9.6
common1.5.4 的具体看官网,别跟2.1.0对应的版本就行