简体   繁体   English

将数据设置为 Firebase 导致我的应用程序不断重启而逻辑上没有错误

[英]Setting data to Firebase Causing My app to restart constantly with no Error in Logical

I have been developing this app since 2019 and I had a released version of it and I was working on an update so there is a new version of the Android Studio came out I have updated Android Studio to Android Studio Bumblebee | 2021.1.1 Patch 1自 2019 年以来,我一直在开发这个应用程序,我有一个发布版本,我正在努力更新,所以有一个新版本的 Android Studio 出来了我已经将 Android Studio 更新为Android Studio Bumblebee | 2021.1.1 Patch 1 Android Studio Bumblebee | 2021.1.1 Patch 1 my kotlin_version = "1.6.10" and compileSdk 31 minSdkVersion 19, targetSdkVersion 31 android 11 Android Studio Bumblebee | 2021.1.1 Patch 1我的kotlin_version = "1.6.10" and compileSdk 31 minSdkVersion 19, targetSdkVersion 31 android 11

I was solving some errors at the beginning like duplicate classes and stuff until I faced this error with firebase when setting the data to firebase Database or Firestore, before this update my Code was working fine and I didn't change much I just added new functions to the app like inAppReview ,我在一开始就解决了一些错误,比如duplicate classes和东西,直到我在将数据设置为 firebase 数据库或 Firestore 时遇到这个错误 firebase,在此更新之前我的代码工作正常并且我没有做太多改变我只是添加了新功能像inAppReview这样的应用程序,

what is happening is that whenever I'm setting data or update some existing data in Firebase Databse or Firestore the app restart and leave no error to detect in the Logcat, Logcat will not be cleared it is just wont show error at the moment of restart, and my app will automatically set a new data to the Firestore or Firebase and some times restart when reading values,发生的事情是,每当我在 Firebase Databse 或 Firestore 中设置数据或更新一些现有数据时,应用程序会重新启动并且不会在 Logcat 中检测到任何错误,Logcat 不会被清除它只是在重新启动时不会显示错误,我的应用程序会自动将新数据设置到 Firestore 或 Firebase 并且有时会在读取值时重新启动,

In the new update, I have come across errors like SQLiteConstraintException: UNIQUE constraint failed and E/android.vendin: Not starting debugger since process cannot load the jdwp agent.在新的更新中,我遇到了像SQLiteConstraintException: UNIQUE constraint failedE/android.vendin: Not starting debugger since process cannot load the jdwp agent. i dont know if it's related but those are showing.我不知道它是否相关,但这些正在显示。

this is a serious problem guys, I have an iOS version same app written in Swift they both share the same functions to write and read to the database I mean same code different Languages connected to the same database there is no errors everything works fine on iOS with the firebase itself, and the same code was working before this update that's mean there's no problem with my code, please if anyone knows anything or came across this kind of situation let me know I need some help, I'm stuck for a week now I have been searching all over the inte.net Didn't found any answer, if anyone needs a further declaration or sharing some code please let me know伙计们,这是一个严重的问题,我有一个 iOS 版本的相同应用程序,用 Swift 编写,它们共享相同的函数来写入和读取数据库,我的意思是相同的代码,不同的语言连接到同一个数据库,没有错误,在 iOS 上一切正常使用 firebase 本身,并且在此更新之前可以使用相同的代码,这意味着我的代码没有问题,如果有人知道或遇到这种情况,请告诉我我需要一些帮助,我被困了一个星期现在我一直在搜索整个 inte.net 没有找到任何答案,如果有人需要进一步声明或共享一些代码,请告诉我

emulator runing R version and the app was tested on a real Device SamsungNote S21模拟器运行 R 版本,该应用程序已在真实设备 SamsungNote S21 上进行测试

Note: if I Run the app the first time and write to firebase the app will crash or as I mentioned restart.注意:如果我第一次运行该应用程序并写入 firebase,该应用程序将崩溃或如我提到的那样重新启动。

Note: but if I wrote to firebase and Re-run my app before the app write again or before the crash the app will works fone注意:但如果我写信给 firebase 并在应用程序再次写入之前或崩溃之前重新运行我的应用程序,应用程序将正常运行

project Gradle项目 Gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.6.10"
    repositories {
        google()
//        jcenter()
        mavenCentral()
//        maven { url "https://maven.google.com" }
        maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.8'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'

    }

}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()

        maven { url 'https://jitpack.io' }
//        maven { url 'https://mapbox.bintray.com/mapbox' }
        maven {
            url 'https://api.mapbox.com/downloads/v2/releases/maven'
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                // Do not change the username below.
                // This should always be `mapbox` (not your username).
                username = 'mapbox'
                // Use the secret token you stored in gradle.properties as the password
                password = "mapboxpass"
            }
        }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app Gradle应用程序 Gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: "androidx.navigation.safeargs.kotlin"
apply plugin: 'com.google.firebase.crashlytics'

android {
    compileSdk 31

    defaultConfig {
        applicationId "id"
        minSdkVersion 19
        targetSdkVersion 31
        versionCode 5
        versionName "1.0.4"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    androidExtensions{
        experimental = true
    }


}


dependencies {

    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.annotation:annotation:1.3.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    testImplementation 'junit:junit:4.12'
    testImplementation("androidx.room:room-testing:2.4.2")
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation("androidx.browser:browser:1.3.0")
    implementation("androidx.annotation:annotation:1.3.0")
    // To use the Java-compatible @Experimental API annotation
    implementation("androidx.annotation:annotation-experimental:1.2.0")

    implementation("com.google.android.play:core:1.10.3")
    implementation("com.google.android.play:core-ktx:1.8.1")
    implementation 'com.google.android.gms:play-services-basement:18.0.0'

    implementation 'com.github.chintan369:Geo-FireStore-Query:1.1.0'
    implementation platform('com.google.firebase:firebase-bom:29.1.0')
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-storage-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'
    implementation 'com.google.firebase:firebase-database-ktx'
    implementation 'com.google.firebase:firebase-config-ktx'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-messaging-ktx'
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.5.0'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation "com.xwray:groupie:2.8.0"
    implementation "com.xwray:groupie-kotlin-android-extensions:2.8.0"
    implementation "com.xwray:groupie-databinding:2.8.0"
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.1.1'

    implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0'){
        exclude group: 'group_name', module: 'module_name'
    }
    implementation 'com.mapbox.mapboxsdk:mapbox-android-core:3.1.0'
    implementation 'com.google.android.gms:play-services-location:19.0.1'
    implementation "com.mapbox.mapboxsdk:mapbox-android-telemetry:6.1.0"
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0'

    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.8.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6'
    implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6') {
        transitive = true
    }

    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
    implementation 'com.github.everhad:AndroidRatingStar:v1.0.4'
    implementation 'com.eyalbira.loadingdots:loading-dots:1.0.2'


}

AndroidManifest.xml AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"
        tools:ignore="ScopedStorage"/>
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera" />

    <application
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="false"
        tools:replace="android:supportsRtl"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        android:requestLegacyExternalStorage="true"
        tools:targetApi="m"
        android:protectionLevel="signature|setup|privileged"
        android:networkSecurityConfig="@xml/network_security_config"
        tools:ignore="UnusedAttribute">

Logcat No Filters - Error Logcat 无过滤器 - 错误

2022-03-04 02:57:45.635 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1929000 job_id=-1 period=3859000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355465605 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
    android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE)
        at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
        at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:938)
        at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
        at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:88)
        at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1701)
        at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1570)
        at apla.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):78)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):196)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):20)
        at apkp.a(:com.google.android.gms@201817022@20.18.17 (040700-311416286):190)
        at apgy.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):8)
        at sji.b(:com.google.android.gms@201817022@20.18.17 (040700-311416286):12)
        at sji.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at spj.run(:com.google.android.gms@201817022@20.18.17 (040700-311416286):0)
        at java.lang.Thread.run(Thread.java:923)
2022-03-04 02:57:45.716 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1929000 job_id=-1 period=3859000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355465690 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 02:58:19.783 9181-9181/? E/NotificationService: Muting recently noisy 0|com.qp.delevare_|0|null|10155
2022-03-04 02:58:24.413 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.414 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.463 423-423/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.464 423-423/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.633 9130-24001/? E/ion: ioctl c0044901 failed with code -1: Inappropriate ioctl for device
2022-03-04 02:58:24.660 9130-24001/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.664 423-941/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.706 423-24007/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:24.709 9130-9365/? E/FMQ: grantorIdx must be less than 3
2022-03-04 02:58:34.751 11867-19785/? E/SQLiteDatabase: Error inserting flex_time=1880000 job_id=-1 period=3761000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355514744 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 02:58:34.879 11867-20246/? E/SQLiteDatabase: Error inserting flex_time=1879000 job_id=-1 period=3760000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646355514866 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0
2022-03-04 03:11:16.563 9181-9181/? E/RemoteAugmentedAutofillService: Bad service name for flags 1048704: com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiAugmentedAutofillService
2022-03-04 03:11:25.574 23552-24315/com.qp.delevare_ E/FirebaseCrash: Failed to report uncaught exception
    java.lang.SecurityException: getDataNetworkTypeForSubscriber
        at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
        at android.os.Parcel.createException(Parcel.java:2357)
        at android.os.Parcel.readException(Parcel.java:2340)
        at android.os.Parcel.readException(Parcel.java:2282)
        at com.android.internal.telephony.ITelephony$Stub$Proxy.getNetworkTypeForSubscriber(ITelephony.java:8762)
        at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:3021)
        at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:2985)
        at aqi.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):164)
        at com.google.firebase.crash.internal.api.FirebaseCrashApiImpl.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):2)
        at com.google.firebase.crash.internal.api.FirebaseCrashApiImpl.reportUncaughtException(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):2)
        at apv.a(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):10)
        at mi.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@201817052@20.18.17 (040700-0):4)
        at android.os.Binder.transact(Binder.java:1043)
        at com.google.android.gms.internal.crash.zza.transactAndReadExceptionReturnVoid(Unknown Source:20)
        at com.google.android.gms.internal.crash.zzn.zzb(Unknown Source:18)
        at com.google.android.gms.internal.crash.zzg.zzd(Unknown Source:13)
        at com.google.android.gms.internal.crash.zzc.run(Unknown Source:12)
        at com.google.android.gms.internal.crash.zzg.run(Unknown Source:15)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
2022-03-04 03:11:27.463 9181-9211/? E/ActivityTaskManager: Second failure launching com.qp.delevare_/.TabbarActivity, giving up
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:540)
        at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2504)
        at android.app.servertransaction.ClientTransaction.schedule(ClientTransaction.java:136)
        at com.android.server.wm.ClientLifecycleManager.scheduleTransaction(ClientLifecycleManager.java:47)
        at com.android.server.wm.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:863)
        at com.android.server.wm.ActivityStackSupervisor.startSpecificActivity(ActivityStackSupervisor.java:971)
        at com.android.server.wm.ActivityStack.resumeTopActivityInnerLocked(ActivityStack.java:1934)
        at com.android.server.wm.ActivityStack.resumeTopActivityUncheckedLocked(ActivityStack.java:1511)
        at com.android.server.wm.ActivityRecord.makeActiveIfNeeded(ActivityRecord.java:4714)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.setActivityVisibilityState(EnsureActivitiesVisibleHelper.java:160)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.lambda$Bbb3nMFa3F8er_OBuKA7-SpeSKo(Unknown Source:0)
        at com.android.server.wm.-$$Lambda$EnsureActivitiesVisibleHelper$Bbb3nMFa3F8er_OBuKA7-SpeSKo.accept(Unknown Source:12)
        at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:307)
        at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
        at com.android.internal.util.function.pooled.OmniFunction.accept(OmniFunction.java:92)
        at com.android.server.wm.ActivityRecord.forAllActivities(ActivityRecord.java:3625)
        at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1350)
        at com.android.server.wm.WindowContainer.forAllActivities(WindowContainer.java:1344)
        at com.android.server.wm.EnsureActivitiesVisibleHelper.process(EnsureActivitiesVisibleHelper.java:104)
        at com.android.server.wm.ActivityStack.ensureActivitiesVisible(ActivityStack.java:1310)
        at com.android.server.wm.TaskDisplayArea.ensureActivitiesVisible(TaskDisplayArea.java:1790)
        at com.android.server.wm.DisplayContent.ensureActivitiesVisible(DisplayContent.java:5524)
        at com.android.server.wm.RootWindowContainer.ensureActivitiesVisible(RootWindowContainer.java:2002)
        at com.android.server.wm.RootWindowContainer.ensureActivitiesVisible(RootWindowContainer.java:1984)
        at com.android.server.wm.ActivityStack.completePauseLocked(ActivityStack.java:1244)
        at com.android.server.wm.ActivityRecord.activityPaused(ActivityRecord.java:4937)
        at com.android.server.wm.ActivityRecord$1.run(ActivityRecord.java:712)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.os.HandlerThread.run(HandlerThread.java:67)
        at com.android.server.ServiceThread.run(ServiceThread.java:44)
2022-03-04 03:11:29.828 12424-12475/? E/MDD: DownloadProgressMonitor: Can't find file group for uri: android://com.google.android.googlequicksearchbox/files/sharedminusonemodule/shared/SharedMinusOneData.pb.tmp
2022-03-04 03:11:32.973 9181-10230/? E/system_server: Invalid class loader spec: =UnsupportedClassLoaderContext=
2022-03-04 03:11:32.973 9181-10230/? E/PackageDexUsage: Unsupported context?
2022-03-04 03:11:35.861 11867-16474/? E/SQLiteDatabase: Error inserting flex_time=1098000 job_id=-1 period=2198000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=201817000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1646356295857 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0

I see there are no problems with your dependencies and I think what you have is that you write data to the firebase database after getting some data using ValueEventListener, so even if your activity has destroyed ValueEventListener will still listen in the previous Activity according to this answer https://stackoverflow.com/a/63636051/8793968 @ and this answer https://stackoverflow.com/a/63636048/8793968 @ so it will restart and show no errors我看到您的依赖项没有问题,我认为您拥有的是在使用 ValueEventListener 获取一些数据后将数据写入 firebase 数据库,因此即使您的活动已销毁,ValueEventListener 仍会根据此答案在之前的活动中收听https://stackoverflow.com/a/63636051/8793968 @ 和这个答案https://stackoverflow.com/a/63636048/8793968 @ 所以它会重新启动并且不会显示错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何摆脱导致我的域出错的 firebase 证书? - how to get rid of firebase cert causing an error on my domain? 如何修复我的 Vue 应用程序未从 Firebase 获取数据的错误? - How to fix error that my Vue app doesn't get data from Firebase? Firebase 名单不断刷新 - Firebase List Constantly Refreshing Flutter,错误,在应用程序中添加数据时,firebase - Flutter, error, when add data in app , firebase Flutter-如何在firebase查询中使用逻辑AND以及如何更新数据? - Flutter-How to use logical AND in firebase query and how to update data? 我在我的应用程序中使用 multiprovider 和 streamBuilder.value(),提供程序仅在我重新启动应用程序或热重载时获取数据 - I'm using multiprovider in my app with streamBuilder.value(), the provider to get the data only if I restart the app or hot reload Firebase 值不不断更新 - Firebase values not updating constantly Firebase Firestore 集合获取方法导致错误 - Firebase Firestore collection get method causing error 如何将我的应用程序从 firebase 获取的数据设置到我的 bottomSheetView? (科特林) - How can I set the fetched data of my app from firebase to my bottomSheetView? (Kotlin) 如何将数据从我的数据库 (Firebase Firestore) 发送到我的 React Native 应用程序? - How do I send data from my database (Firebase Firestore) to my React Native app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM