SecurityException Content provider
java.lang.SecurityException: Failed to find provider null for user 0; expected to find a valid ContentProvider for this authority
at android.os.Parcel.createException(Parcel.java:1950)
at android.os.Parcel.readException(Parcel.java:1918)
at android.os.Parcel.readException(Parcel.java:1868)
at android.content.IContentService$Stub$Proxy.notifyChange(IContentService.java:812)
at android.content.ContentResolver.notifyChange(ContentResolver.java:2112)
at android.content.ContentResolver.notifyChange(ContentResolver.java:2063)
at android.content.ContentResolver.notifyChange(ContentResolver.java:2033)
at com.activeandroid.query.From.execute(From.java:304)
at com.example.model.FeaturedGallery.saveAll(FeaturedGallery.java:136)
at com.example.api.FeaturedGalleryJob.storeData(FeaturedGalleryJob.java:45)
at com.example.api.ExampleJob.onRun(ExampleJob.java:109)
at com.path.android.jobqueue.BaseJob.safeRun(BaseJob.java:108)
at com.path.android.jobqueue.JobHolder.safeRun(JobHolder.java:60)
at com.path.android.jobqueue.executor.JobConsumerExecutor$JobConsumer.run(JobConsumerExecutor.java:201)
at java.lang.Thread.run(Thread.java:764)
My app works perfectly in Android < Oreo but in Android Oreo crash
My AndroidManifest.xml its right, I add the solutions in other threads about this problem
<provider
android:name=".contentprovider.CustomProvider"
android:enabled="true"
android:exported="false"
android:authorities="@string/authority"/>`
@alvaromarco do you think Active Android is still supported?
@alvaromarco do you think Active Android is still supported?
No, I know but I need to try
<provider
android:name="com.activeandroid.content.ContentProvider"
android:authorities="YOUR_APP_PACKAGENAME"
android:enabled="true"
android:exported="false">
</provider>
We use this config in manifest, and have not encountered problems yet.
I see the same problem on Android 13 for some of the users.
@konstantin-gorbunov , this library was great 8 years ago. Now it's outdated and not maintained. I recommend you consider migration to alternative ORMs.