gpt4 book ai didi

android - java.lang.SecurityException : Failed to find provider questions for user 0; expected to find a valid ContentProvider 错误

转载 作者:行者123 更新时间:2023-11-30 00:17:12 46 4
gpt4 key购买 nike

我正在使用 se.emilsjolander:sprinkles:1.3.1 库将数据保存到我的数据库中。当我升级到 oreo sdk 26 时,收到一条错误消息,指出应该有一个有效的内容提供者。我不知道如何用我的图书馆来实现它。谁能帮我说清楚?我在这里添加堆栈。

 java.lang.SecurityException: Failed to find provider questions f user 0; expected to find a valid ContentProvider for this authority 10-31

最佳答案

在 API 级别 26 之前,您可以提供一个没有功能的 stub ContentProvider,现在一些最小的功能是强制性的。参见 https://developer.android.com/about/versions/oreo/android-8.0-changes.html#ccn

Android 8.0 (API level 26) changes how ContentResolver.notifyChange() and registerContentObserver(Uri, boolean, ContentObserver) behave for apps targeting Android 8.0.

These APIs now require that a valid ContentProvider is defined for the authority in all Uris. Defining a valid ContentProvider with relevant permissions will help defend your app against content changes from malicious apps, and prevent you from leaking potentially private data to malicious apps.

关于android - java.lang.SecurityException : Failed to find provider questions for user 0; expected to find a valid ContentProvider 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47032767/

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