I have defined a provider in my application manifest :
<provider
android:authorities="com.example.myapp.provider"
android:name="com.example.myapp.MyProvider">
</provider>
The provider is required only to be used within the application. But I get the below error when i try to run my activity :
Failed to find provider info..
But it works perfectly if i simply set the export attribute of the provider in the manifest :
android:exported="true"
So my question is why is this required? Because, according to the documentation(http://developer.android.com/guide/topics/manifest/provider-element.html#exported), export is required only if the provider is to be available for other applications. Am i doing something wrong?
[Edit] : Suprisingly, the error has disappeared now even after removing the exported attribute, without making any other changes. I have no clue why it is working now. Probably some stupid mistake from my side. I leave this question open in hope of getting any clues as to what must have gone wrong.
[Edit] : I am facing this issue again with a receiver this time. So it was not a mistake from my side, as i assumed in my previous edit. I suspect something is wrong in the ADT build tool.