我已将Firestore
合并到我的应用程序中,以进行一些表的基本读写。该应用程序在调试模式下运行良好,但是当我生成发行版时,会发生以下错误:
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)
似乎没有任何配置问题。该如何补救?
答案 0 :(得分:0)
在设备上的应用程序管理器中清除数据。
然后再次运行该应用程序。
参考:Internal error in Firestore (0.6.6-dev) when trying to update document
答案 1 :(得分:0)
尝试了几件事之后;有效的方案是使用以下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
我使用的gradle version 3.3.0-alpha11
和google services v4.0.1
不兼容,因此崩溃了。
答案 2 :(得分:0)
Firebase Firestore 也只是在生产模式下出现错误。我尝试了上一个答案,但它对我不起作用,所以我尝试了不同的组合,以下组合对我来说非常适合:
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"
}