I have seen a few similar posts to this, but i already have had the ContentProvider
registered in my AndroidManifest
.
I have a ContentProvider
called MyContentProvider
.
And MyContentProvider
is located in a library project called MyProject
. With package location personal.mobile.abc.angry.tiger.MyContentProvider
.
My AndroidManifest
for this project looks like this (left out info that is not related):
<application
android:label=...
android:icon=...
android:theme=...>
<provider
android:name="personal.mobile.abc.angry.tiger.MyContentProvider"
android:authorities="personal.mobile.abc.angry.tiger">
</provider>
</application>
Lint keeps saying this:
The <provider> personal.mobile.abc.angry.tiger.MyContentProvider is not registered in the manifest.
And Logcat says this when attempting to run the application that includes the library that contains the ContentProvider
:
Failed to find provider info for personal.mobile.abc.angry.tiger
What am i doing wrong? What is the issue?
If you need any further information, please let me know.
Thanks!
Your <provider>
element needs to be in the application, as it is the one with the ContentProvider
. The fact that the Java class implementing that ContentProvider
happens to be in an Android library project does not change the fact that the hosting app is the one responsible for that provider.
Eventually -- perhaps as soon as ADT 21 -- your <provider>
element in the library project can be automatically added to your application project. Right now, AFAIK, that process is manual.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.