gzu-liyujiang / Android_CN_OAID

安卓设备唯一标识解决方案,可替代移动安全联盟(MSA)统一 SDK 闭源方案。包括国内手机厂商的开放匿名标识(OAID)、海外手机平台的安卓广告标识(AAID),另外也提供了 IMEI/MEID、AndroidID、WidevineID、PseudoID、GUID 等常见的设备标识的获取方法。
https://gzu-liyujiang.github.io/Android_CN_OAID/
Other
2.32k stars 349 forks source link

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/ads/identifier/AdvertisingIdClient #96

Open lilei-daitoudage opened 3 days ago

lilei-daitoudage commented 3 days ago

AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/ads/identifier/AdvertisingIdClient; java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/ads/identifier/AdvertisingIdClient; at com.github.gzuliyujiang.oaid.impl.HuaweiImpl.supported(HuaweiImpl.java:49) at com.github.gzuliyujiang.oaid.impl.OAIDFactory.create(OAIDFactory.java:44) at com.github.gzuliyujiang.oaid.DeviceID.supportedOAID(DeviceID.java:233) at com.spark.oaid.OAIDMediator.supportedOAID(OAIDMediator.java:55) at com.spark.oaid.OAIDMediator.getDeviceIdentifier(OAIDMediator.java:43) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0) at com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:122) at android.os.Handler.dispatchMessage(Handler.java:113) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:293) at com.unity3d.player.UnityPlayer$F.run(Unknown Source)

设备:华为mate50 系统版本:鸿蒙 4.2.0

同一套代码,同一个设备,在app1中运行正常,在app2中运行会报上面的错,反编译两个apk发现,出问题的apk中没有huaweiSDK相关类. 混淆配置如下: -keep class repeackage.com.uodis.opendevice.aidl. { *; } -keep interface repeackage.com.uodis.opendevice.aidl.* { ; } -keep class repeackage.com.asus.msa.SupplementaryDID. { *; } -keep interface repeackage.com.asus.msa.SupplementaryDID. { *; } -keep class repeackage.com.bun.lib.* { ; } -keep interface repeackage.com.bun.lib. { *; } -keep class repeackage.com.heytap.openid. { *; } -keep interface repeackage.com.heytap.openid.* { ; } -keep class repeackage.com.samsung.android.deviceidservice. { *; } -keep interface repeackage.com.samsung.android.deviceidservice. { *; } -keep class repeackage.com.zui.deviceidservice.* { ; } -keep interface repeackage.com.zui.deviceidservice. { *; } -keep class repeackage.com.coolpad.deviceidsupport. { *; } -keep interface repeackage.com.coolpad.deviceidsupport.* { ; } -keep class repeackage.com.android.creator. { *; } -keep interface repeackage.com.android.creator. { *; } -keep class repeackage.com.google.android.gms.ads.identifier.internal.* { ; } -keep interface repeackage.com.google.android.gms.ads.identifier.internal. { ; } -keep class repeackage.com.oplus.stdid. {*; } -keep interface repeackage.com.oplus.stdid. {*; } -keep class com.huawei.hms.ads.* {; } -keep interface com.huawei.hms.ads. {*; } -keep class com.hihonor.ads. {*; } -keep interface com.hihonor.ads.* {; } -keep class repeackage.com.qiku.id. { *; } -keep interface repeackage.com.qiku.id.* { ; }

liyujiang-gzu commented 2 days ago

参阅 #86