gpt4 book ai didi

升级 Xamarin.Azure.NotificationHubs.Android v1.1.4.1 后,Xamarin.Android 应用程序在 Firebase 启动时崩溃

转载 作者:行者123 更新时间:2023-12-04 14:44:14 28 4
gpt4 key购买 nike

在我的应用程序中将 Xamarin.Azure.NotificationHubs.Android Nuget 从古老的 0.6 升级到 1.1.4.1(这还涉及从支持库升级到 AndroidX)后 - 没有 Azure 通知中心和 FireBase Nuget(以及使用它们的注释代码),一切正常.使用这些 Azure/FCM NuGets 启动应用程序时出现异常:

[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] Process: com.taphome.android.next, PID: 12930
[AndroidRuntime] java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/datatransport/runtime/ExecutionModule_ExecutorFactory;
[AndroidRuntime] at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent.initialize(DaggerTransportRuntimeComponent.java:75)
[AndroidRuntime] at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent.<init>(DaggerTransportRuntimeComponent.java:66)
[AndroidRuntime] at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent.<init>(DaggerTransportRuntimeComponent.java:36)
[AndroidRuntime] at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent$Builder.build(DaggerTransportRuntimeComponent.java:109)
[AndroidRuntime] at com.google.android.datatransport.runtime.TransportRuntime.initialize(TransportRuntime.java:78)
[AndroidRuntime] at com.google.firebase.datatransport.TransportRegistrar.lambda$getComponents$0(TransportRegistrar.java:37)
[AndroidRuntime] at com.google.firebase.datatransport.TransportRegistrar$$Lambda$1.create(Unknown Source:0)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:132)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.components.AbstractComponentContainer.get(AbstractComponentContainer.java:27)
[AndroidRuntime] at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
[AndroidRuntime] at com.google.firebase.messaging.FirebaseMessagingRegistrar.lambda$getComponents$0$FirebaseMessagingRegistrar(Unknown Source:43)
[AndroidRuntime] at com.google.firebase.messaging.FirebaseMessagingRegistrar$$Lambda$0.create(Unknown Source:0)
[AndroidRuntime] at android.os.Looper.loop(Loope02-05 23:18:04.900 E/AndroidRuntime(12930): at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:132)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(ComponentRuntime.java:281)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeAllApis(FirebaseApp.java:584)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:303)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:267)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:252)
[AndroidRuntime] at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
[AndroidRuntime] at android.content.ContentProvider.attachInfo(ContentProvider.java:2113)
[AndroidRuntime] at android.content.ContentProvider.attachInfo(ContentProvider.java:2087)
[AndroidRuntime] at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:7751)
[AndroidRuntime] at android.app.ActivityThread.installContentProviders(ActivityThread.java:7296)
[AndroidRuntime] at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7153)
[AndroidRuntime] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7121)
[AndroidRuntime] at android.app.ActivityThread.access$1500(ActivityThread.java:274)
[AndroidRuntime] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2102)
[AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:107)
[AndroidRuntime] at android.os.Looper.loop(Looper.java:237)
[AndroidRuntime] at android.app.ActivityThread.main(ActivityThread.java:8154)
[AndroidRuntime] at java.lang.reflect.Method.invoke(Native Method)
[AndroidRuntime] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
[AndroidRuntime] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
[AndroidRuntime] Caused by: java.lang.ClassNotFoundException: com.google.android.datatransport.runtime.ExecutionModule_ExecutorFactory
[AndroidRuntime] at java.lang.VMClassLoader.findLoadedClass(Native Method)
[AndroidRuntime] at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[AndroidRuntime] ... 40 more
[AndroidRuntime] Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/datatransport/runtime/dagger/internal/Factory;
[AndroidRuntime] ... 40 more
[AndroidRuntime] Caused by: java.lang.ClassNotFoundException: com.google.android.datatransport.runtime.dagger.internal.Factory
[AndroidRuntime] at java.lang.VMClassLoader.findLoadedClass(Native Method)
[AndroidRuntime] at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[AndroidRuntime] ... 40 more
[AndroidRuntime] Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/inject/Provider;
[AndroidRuntime] ... 40 more
[AndroidRuntime] Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.inject.Provider" on path: DexPathList[[zip file "/data/app/com.taphome.android.next-UA_GiR9v1xnKi34mZZEeCg==/base.apk"],nativeLibraryDirectories=[/data/app/com.taphome.android.next-UA_GiR9v1xnKi34mZZEeCg==/lib/arm, /data/app/com.taphome.android.next-UA_GiR9v1xnKi34mZZEeCg==/base.apk!/lib/armeabi-v7a, /system/lib, /product/lib]]
[AndroidRuntime] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[AndroidRuntime] at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[AndroidRuntime] ... 40 more

最佳答案

我不得不添加“Xamarin.Google.Dagger”NuGet,它没有在“Xamarin.Azure.NotificationHubs.Android”依赖项中列出。

关于升级 Xamarin.Azure.NotificationHubs.Android v1.1.4.1 后,Xamarin.Android 应用程序在 Firebase 启动时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66071588/

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