Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

华为P40 Pro海外版,崩溃 #75

Open
Wood-Android opened this issue Dec 2, 2023 · 2 comments
Open

华为P40 Pro海外版,崩溃 #75

Wood-Android opened this issue Dec 2, 2023 · 2 comments

Comments

@Wood-Android
Copy link

Wood-Android commented Dec 2, 2023

华为P40 Pro
机型:ELS-NX9
Android 10
版本号:10.1.0.176
EMUI版本:10.1.0
Release 4.2.7 版本,aar接入
直接下载版本release里的apk demo运行正常

崩溃堆栈:

FATAL EXCEPTION: pool-2-thread-1
Process: com.example.assistant, PID: 21772
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/ads/identifier/AdvertisingIdClient;
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl.runOnSubThread(HuaweiImpl.java:82)
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl.access$000(HuaweiImpl.java:35)
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl$1.run(HuaweiImpl.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/com.example.assistant-jl6cLvrHIfSpVaHbEbA-NQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.assistant-jl6cLvrHIfSpVaHbEbA-NQ==/lib/arm64, /data/app/com.example.assistant-jl6cLvrHIfSpVaHbEbA-NQ==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl.runOnSubThread(HuaweiImpl.java:82) 
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl.access$000(HuaweiImpl.java:35) 
at com.github.gzuliyujiang.oaid.impl.HuaweiImpl$1.run(HuaweiImpl.java:72) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:929) 

@liyujiang-gzu
Copy link
Member

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

老铁,目测是你的apk没有把华为的广告标识符SDK打包进去。

@liyujiang-gzu
Copy link
Member

liyujiang-gzu commented Dec 4, 2023

// 如果华为官方广告标识服务SDK下载失败或编译报错的话,可考虑在 build.gradle 中增加以下配置:
        repositories { maven {url 'https://developer.huawei.com/repo/'} }

        runtimeOnly "com.huawei.hms:ads-identifier:3.4.62.300"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants