我刚刚将Firebase添加到我的应用程序中,想要使用Crash控制服务和Google Analytics。一切都很好,直到我从主页按钮关闭我的应用程序,然后我再次访问它。在那之后,我的应用程序完全冻结,任何响应,任何错误和我可以从我的logcat获得的唯一日志是:
01-01 15:55:40.600 1236 1262 W BroadcastQueue: Timeout of broadcast BroadcastRecord{fb70722 u0 com.google.firebase.INSTANCE_ID_EVENT} - receiver=android.os.BinderProxy@b6695b3, started 60009ms ago
01-01 15:55:40.600 1236 1262 W BroadcastQueue: Receiver during timeout: ResolveInfo{7bc7770 com.bq.camerabq/com.google.firebase.iid.FirebaseInstanceIdInternalReceiver m=0x0}
01-01 15:55:40.647 1236 1262 I ActivityManager: Skipping duplicate ANR: ProcessRecord{ce79b34 8173:com.bq.camerabq/u0a96} Broadcast of Intent { act=com.google.firebase.INSTANCE_ID_EVENT flg=0x14 cmp=com.bq.camerabq/com.google.firebase.iid.FirebaseInstanceIdInternalReceiver (has extras) }
我第一次启动应用时出现此错误,但我在此帖中看到它始终发生,是Firebase常见错误(Fail to read module...Firebase):
01-01 16:18:33.155 2149 2149 D FirebaseApp: Initialized class com.google.firebase.auth.FirebaseAuth.
01-01 16:18:33.163 2149 2149 D FirebaseApp: Initialized class com.google.firebase.iid.FirebaseInstanceId.
01-01 16:18:33.167 2149 2186 E DynamiteModule: Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/com.bq.camerabq-1/base.apk"],nativeLibraryDirectories=[/data/app/com.bq.camerabq-1/lib/arm, /data/app/com.bq.camerabq-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
01-01 16:18:33.219 2149 2149 E FirebaseCrash: com.google.firebase.crash.internal.zzg$zza: com.google.android.gms.internal.zzqi$zza: No acceptable module found. Local version is 0 and remote version is 0.
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.crash.internal.zzg.zzah(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.crash.FirebaseCrash.<init>(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.crash.FirebaseCrash.getInstance(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.FirebaseApp.zza(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
01-01 16:18:33.219 2149 2149 E FirebaseCrash: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
01-01 16:18:33.219 2149 2149 D FirebaseApp: Initialized class com.google.firebase.crash.FirebaseCrash.
我知道这是Firebase集成,因为我尝试使用Firebase集成恢复上一次提交,并且在任何设备中都不会发生此错误。我刚刚在我的gradle中添加了下一行:
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-crash:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'
和google服务插件:
apply plugin: 'com.google.gms.google-services'
当然,我还将我的google服务文件添加到了我的应用中。说实话,我不知道这里发生了什么。我搜索了很多关于这个问题,但我没有找到这么多。只是一个与我有类似问题的人的帖子,但对他而言,使用Cordova和Angular与Firebase一起发生,在我的案例中是Android应用程序。无论如何,他没有找到No connection on Resume Firebase+Cordova的解决方案。