[英]Error running app with Firestore in release mode
I have incorporated Firestore
into my app for basic reads and writes to some tables.我已将Firestore
合并到我的应用程序中,以便对某些表进行基本的读取和写入。 The app works fine in debug mode but when I generate the release build, the following error occurs:该应用程序在调试模式下运行良好,但是当我生成发布版本时,出现以下错误:
java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev).
at com.google.firebase.firestore.g.zza.a(com.google.firebase:firebase-firestore@@17.0.5:14)
at com.google.firebase.firestore.g.zzd.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6649)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
Caused by: java.lang.AbstractMethodError: abstract method "com.google.protobuf.Internal$ProtobufList com.google.protobuf.Internal$ProtobufList.b(int)"
at com.google.protobuf.GeneratedMessageLite.a(GeneratedMessageLite.java:36)
at com.google.b.a.zzan.a(com.google.firebase:firebase-firestore@@17.0.5:91)
at com.google.b.a.zzan$zza.a(com.google.firebase:firebase-firestore@@17.0.5:2)
at com.google.firebase.firestore.f.zzn.b(com.google.firebase:firebase-firestore@@17.0.5:28)
at com.google.firebase.firestore.c.zzh.a(com.google.firebase:firebase-firestore@@17.0.5:59)
at com.google.firebase.firestore.c.zzav.b(com.google.firebase:firebase-firestore@@17.0.5:8)
at com.google.firebase.firestore.c.zzi.a(com.google.firebase:firebase-firestore@@17.0.5:52)
at com.google.firebase.firestore.c.zzp.run(Unknown Source:6)
at com.google.firebase.firestore.c.zzat.a(com.google.firebase:firebase-firestore@@17.0.5:15)
at com.google.firebase.firestore.c.zzi.a(com.google.firebase:firebase-firestore@@17.0.5:43)
at com.google.firebase.firestore.b.zzac.a(com.google.firebase:firebase-firestore@@17.0.5:5)
at com.google.firebase.firestore.b.zzd.a(com.google.firebase:firebase-firestore@@17.0.5:9)
at com.google.firebase.firestore.b.zzg.c(com.google.firebase:firebase-firestore@@17.0.5:1)
at com.google.firebase.firestore.b.zzo.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.g.zza$zza.run(com.google.firebase:firebase-firestore@@17.0.5:3)
at java.lang.Thread.run(Thread.java:764)
There doesn't seem to be any configuration issue.似乎没有任何配置问题。 How can this be remedied?如何补救?
Clear the data in the application manager on the device.清除设备上应用程序管理器中的数据。
Then run the app again.然后再次运行该应用程序。
Ref: Internal error in Firestore (0.6.6-dev) when trying to update document参考: 尝试更新文档时 Firestore (0.6.6-dev) 中的内部错误
After trying out a few things;在尝试了几件事之后; the scenario that worked was using the following combination of lib versions:有效的场景是使用以下 lib 版本组合:
com.google.firebase:firebase-firestore:17.1.0
com.google.gms:google-services:4.1.0
com.android.tools.build:gradle:3.2.0
I was using gradle version 3.3.0-alpha11
and google services v4.0.1
which are incompatible hence the crashes.我使用的gradle version 3.3.0-alpha11
和google services v4.0.1
不兼容,因此崩溃。
I´ve also got an error with Firebase Firestore JUST in production mode. Firebase Firestore 也只是在生产模式下出现错误。 I tried the previous answer but it didnt worked for me so I tried different combinations and the following one worked perfectly for me:我尝试了上一个答案,但对我不起作用,所以我尝试了不同的组合,以下组合对我来说非常有效:
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.