gpt4 book ai didi

Android没有找到类“androidx.work.impl.WorkManagerInitializer

转载 作者:行者123 更新时间:2023-12-04 03:46:08 25 4
gpt4 key购买 nike

我真的很茫然,我的应用程序现在随机有这个关于 crashlytics 的崩溃报告,我似乎无法复制它,甚至无法弄清楚它会在哪里崩溃,因为它没有告诉我。上周它才开始给我这些崩溃。我的 min sdk 是 24,我试图以 29 和 30 为目标,但仍然出现崩溃。谁能暗示我如何才能真正追踪到它,因为它没有直接出现在我的设备上,或者我可能开始看的地方?没有在我的项目中使用 WorkManagerInitializer除非它是我不知道的图书馆的一部分。

Fatal Exception: java.lang.RuntimeException: Unable to get provider androidx.work.impl.WorkManagerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.work.impl.WorkManagerInitializer" on path: DexPathList[[zip file "/data/app/com.myapp-TEzM5SrnhKhfsdQ-sNWHsQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp-TEzM5SrnhKhfsdQ-sNWHsQ==/lib/arm64, /system/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:7462)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7002)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6890)
at android.app.ActivityThread.access$1300(ActivityThread.java:269)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2010)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)

Caused by java.lang.ClassNotFoundException: Didn't find class "androidx.work.impl.WorkManagerInitializer" on path: DexPathList[[zip file "/data/app/com.myapp-TEzM5SrnhKhfsdQ-sNWHsQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp-TEzM5SrnhKhfsdQ-sNWHsQ==/lib/arm64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)
at android.app.ActivityThread.installProvider(ActivityThread.java:7446)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7002)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6890)
at android.app.ActivityThread.access$1300(ActivityThread.java:269)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2010)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)

最佳答案

解决方案是将此行添加到您的 proguard 文件中:

-keep class androidx.work.** { *; }

关于Android没有找到类“androidx.work.impl.WorkManagerInitializer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65120143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com