Android:Cloud Firestore 中的内部错误 (24.0.2)

Aba*_*mir 7 android firebase

我正在使用 Firestore 24.0.2,它运行良好,但现在我惊讶地发现它不起作用,并且在 Splash Activity 之后打开 MainActivity 时应用程序崩溃。

\n

我尝试删除一些依赖项,但问题仍然存在。

\n

所以,应用程序运行后:

\n

首先-> 启动屏幕显示了 Firebase RemoteConfig 中的一些代码,并且运行良好。

\n

第二-> 它移动到主活动,其中有使用 Firestore 的片段,在显示主活动不到一秒后,应用程序崩溃,java.lang.RuntimeException: Internal error in Cloud Firestore (24.0.2)

\n

我在 Stack Overflow、GitHub 和更多网站上看到了很多帖子和问题,但没有一个解决方案适合我。

\n

完整的崩溃代码:

\n
  java.lang.RuntimeException: Internal error in Cloud Firestore (24.0.2).\n        at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:539)\n        at com.google.firebase.firestore.util.AsyncQueue$$ExternalSyntheticLambda3.run(Unknown Source:2)\n        at android.os.Handler.handleCallback(Handler.java:938)\n        at android.os.Handler.dispatchMessage(Handler.java:99)\n        at android.os.Looper.loop(Looper.java:246)\n        at android.app.ActivityThread.main(ActivityThread.java:8633)\n        at java.lang.reflect.Method.invoke(Native Method)\n        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)\n     Caused by: java.lang.RuntimeException: android.database.sqlite.SQLiteException: not an error (code 0 SQLITE_OK[0])\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java:330)\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$ExternalSyntheticLambda0.run(Unknown Source:4)\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:234)\n        at java.lang.Thread.run(Thread.java:923)\n     Caused by: android.database.sqlite.SQLiteException: not an error (code 0 SQLITE_OK[0])\n        at android.database.sqlite.SQLiteConnection.nativeRegisterLocalizedCollators(Native Method)\n        at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:647)\n        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:387)\n        at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:226)\n        at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:737)\n        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:284)\n        at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:251)\n        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1392)\n        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1337)\n        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:980)\n        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:444)\n        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:387)\n        at com.google.firebase.firestore.local.SQLitePersistence.start(SQLitePersistence.java:138)\n        at com.google.firebase.firestore.core.ComponentProvider.initialize(ComponentProvider.java:139)\n        at com.google.firebase.firestore.core.FirestoreClient.initialize(FirestoreClient.java:272)\n        at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0$com-google-firebase-firestore-core-FirestoreClient(FirestoreClient.java:109)\n        at com.google.firebase.firestore.core.FirestoreClient$$ExternalSyntheticLambda17.run(Unknown Source:8)\n        at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(AsyncQueue.java:441)\n        at com.google.firebase.firestore.util.AsyncQueue$$ExternalSyntheticLambda6.call(Unknown Source:2)\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java:327)\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$ExternalSyntheticLambda0.run(Unknown Source:4)\xc2\xa0\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)\xc2\xa0\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\xc2\xa0\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\xc2\xa0\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\xc2\xa0\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\xc2\xa0\n        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:234)\xc2\xa0\n        at java.lang.Thread.run(Thread.java:923)\xc2\xa0\n
Run Code Online (Sandbox Code Playgroud)\n

小智 6

我已经尝试了许多可用的答案,例如禁用 minify 启用为 false,这不是正确的方法。经过2天的努力,终于在pro-guard中添加了一行,解决了这个问题。

-保留类 io.grpc.** {*;}


Ade*_*eun 1

我只需恢复到 Firestore 24.0.0,它就停止了。