gpt4 book ai didi

android - 每个 Activity 开始后显示 SQLiteConstraintException 错误

转载 作者:行者123 更新时间:2023-12-03 13:24:36 31 4
gpt4 key购买 nike

我一直在 logcat 中弹出这个错误。它总是在每次 Activity 更改后显示。有时,该应用程序会消失,然后它会再次显示。 logcat 中没有任何 fatal error ,我所看到的只是:

2020-05-20 11:53:26.422 2940-8484/? E/SQLiteDatabase: Error inserting flex_time=3324000 job_id=-1 period=6650000 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=201516000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1589968406417 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:879)
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:1599)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1468)
at aplm.a(:com.google.android.gms@201516038@20.15.16 (120406-309763488):76)
at aplb.a(:com.google.android.gms@201516038@20.15.16 (120406-309763488):173)
at aplb.a(:com.google.android.gms@201516038@20.15.16 (120406-309763488):21)
at aplb.a(:com.google.android.gms@201516038@20.15.16 (120406-309763488):167)
at aphk.run(:com.google.android.gms@201516038@20.15.16 (120406-309763488):8)
at sob.b(:com.google.android.gms@201516038@20.15.16 (120406-309763488):12)
at sob.run(:com.google.android.gms@201516038@20.15.16 (120406-309763488):7)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at sub.run(:com.google.android.gms@201516038@20.15.16 (120406-309763488):0)
at java.lang.Thread.run(Thread.java:919)

但它没有显示代码的任何地方是否有任何解决方案?

编辑:谷歌图书馆:
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.firebase:firebase-core:17.1.0'
implementation 'com.google.firebase:firebase-database:19.0.0'
implementation 'com.google.firebase:firebase-analytics:17.0.1'
implementation 'com.google.firebase:firebase-perf:19.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.1'

最佳答案

从此issuefirebase-android-sdk 中打开项目:

Since it requires an update to play services, I'm holding off from giving you a timeline for when this will roll out. But, this would require no action/SDK upgrades from developers and should get fixed on your customer devices automatically.

关于android - 每个 Activity 开始后显示 SQLiteConstraintException 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61910260/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com