问题
I am using FireStore in my application.
and their version is
implementation 'com.google.firebase:firebase-firestore:17.0.1'
I am using database of Firestore and offline feature of firestore to get data.
this is working fine but when i sign the application that time i am getting below bug.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.firestoretest.videostatus, PID: 13763
java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev).
at bov.b(Unknown Source:19)
at box.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:172)
at android.app.ActivityThread.main(ActivityThread.java:6637)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ExceptionInInitializerError
at cbh.<clinit>(Unknown Source:20)
at ced.b(Unknown Source:0)
at cee.b(Unknown Source:0)
at cee.a(Unknown Source:0)
at car.a(Unknown Source:4)
at bod.<init>(Unknown Source:22)
at bjo.a(Unknown Source:87)
at bjq.run(Unknown Source:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
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:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at bov$a.run(Unknown Source:15)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Package.getImplementationVersion()' on a null object reference
at cco.b(Unknown Source:6)
at cco.<clinit>(Unknown Source:137)
at cbh.<clinit>(Unknown Source:20)
at ced.b(Unknown Source:0)
at cee.b(Unknown Source:0)
at cee.a(Unknown Source:0)
at car.a(Unknown Source:4)
at bod.<init>(Unknown Source:22)
at bjo.a(Unknown Source:87)
at bjq.run(Unknown Source:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
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:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at bov$a.run(Unknown Source:15)
at java.lang.Thread.run(Thread.java:764)
Please anyone have any idea about this error then please inform me. Thanks in Advance.
回答1:
Try to add -keep class io.grpc.** {*;} to your proguard configuration. It should work. There haven't been any crashes since I added it. Will be testing further.
回答2:
Are you saying this happen after creating signed apk?
Then try to add SHA1 or SHA256 of your signed app in firebase console
and if you using objects to get data and using minifyEnabled true in gradle
then change your proguard file
回答3:
I had the same issue, ever since I updated my firestore dependency to be over v16. It only happens on my release builds, specifically where debuggable has to be set to false.
I can confirm that the selected solution (of adding the following to the proguard config) did solve the crashes through.
-keep class io.grpc.** {*;}
回答4:
Update the following:
Firebase dependency versions and Play services dependency versions.
That solved my problem.
来源:https://stackoverflow.com/questions/50739346/java-lang-runtimeexception-internal-error-in-firestore-0-6-6-dev