更改db(firebase)应用程序时崩溃

时间:2019-06-18 12:30:47

标签: firebase flutter


当我对数据库进行更改时(例如Firebase数据库),例如更改收藏夹按钮(即bool)或添加产品,应用程序将关闭,并出现以下错误:

我试图更改google-services.json文件

编辑:我刚刚切换到另一个功能分支,它起作用了,似乎它与我最近添加的语音识别功能有关。 speech_recognition:

I/com.avl.newapp(10840): Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.messaging.FirebaseMessagingService>: java.lang.IllegalAccessError: Class com.google.firebase.iid.zzb extended by class com.google.firebase.messaging.FirebaseMessagingService is inaccessible (declaration of 'com.google.firebase.messaging.FirebaseMessagingService' appears in /data/app/com.avl.newapp-ypRIIl6vUHjsjklEiaTYtQ==/base.apk)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:738)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:363)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/com.avl.newapp(10840):   at android.app.Service android.app.AppComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (AppComponentFactory.java:103)
I/com.avl.newapp(10840):   at android.app.Service androidx.core.app.CoreComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (CoreComponentFactory.java:68)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.handleCreateService(android.app.ActivityThread$CreateServiceData) (ActivityThread.java:3514)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.access$1300(android.app.ActivityThread, android.app.ActivityThread$CreateServiceData) (ActivityThread.java:199)
I/com.avl.newapp(10840):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1666)
I/com.avl.newapp(10840):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
I/com.avl.newapp(10840):   at void android.os.Looper.loop() (Looper.java:193)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6669)
I/com.avl.newapp(10840):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/com.avl.newapp(10840):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/com.avl.newapp(10840):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/com.avl.newapp(10840): 
I/com.avl.newapp(10840): Rejecting re-init on previously-failed class java.lang.Class<io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/messaging/FirebaseMessagingService;
I/com.avl.newapp(10840):   at java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:738)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:363)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/com.avl.newapp(10840):   at android.app.Service android.app.AppComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (AppComponentFactory.java:103)
I/com.avl.newapp(10840):   at android.app.Service androidx.core.app.CoreComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (CoreComponentFactory.java:68)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.handleCreateService(android.app.ActivityThread$CreateServiceData) (ActivityThread.java:3514)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.access$1300(android.app.ActivityThread, android.app.ActivityThread$CreateServiceData) (ActivityThread.java:199)
I/com.avl.newapp(10840):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1666)
I/com.avl.newapp(10840):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
I/com.avl.newapp(10840):   at void android.os.Looper.loop() (Looper.java:193)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6669)
I/com.avl.newapp(10840):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/com.avl.newapp(10840):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/com.avl.newapp(10840):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/com.avl.newapp(10840): Caused by: java.lang.ClassNotFoundException: com.google.firebase.messaging.FirebaseMessagingService
I/com.avl.newapp(10840):   at java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:738)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:363)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:738)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:363)
I/com.avl.newapp(10840):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/com.avl.newapp(10840):   at android.app.Service android.app.AppComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (AppComponentFactory.java:103)
I/com.avl.newapp(10840):   at android.app.Service androidx.core.app.CoreComponentFactory.instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) (CoreComponentFactory.java:68)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.handleCreateService(android.app.ActivityThread$CreateServiceData) (ActivityThread.java:3514)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.access$1300(android.app.ActivityThread, android.app.ActivityThread$CreateServiceData) (ActivityThread.java:199)
I/com.avl.newapp(10840):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1666)
I/com.avl.newapp(10840):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
I/com.avl.newapp(10840):   at void android.os.Looper.loop() (Looper.java:193)
I/com.avl.newapp(10840):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6669)
I/com.avl.newapp(10840):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/com.avl.newapp(10840):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:493)
I/com.avl.newapp(10840):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:858)
I/com.avl.newapp(10840): 
D/AndroidRuntime(10840): Shutting down VM
E/AndroidRuntime(10840): FATAL EXCEPTION: main

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.16299.1146], locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.4)
[√] Proxy Configuration
[√] Connected device (2 available)

! Doctor found issues in 1 category.

1 个答案:

答案 0 :(得分:0)

我看来,我的包裹正在​​这样做。我已经实现了推送通知,它使用了firebase_core: ^0.3.0,但是我想对其进行更新,而新的更新破坏了该应用程序。

所以我做了些什么,我回来了

  cloud_firestore: ^0.9.11
  firebase_core: ^0.3.0