以下轉自百度知道
問:
自己創建了個ContentProvider
以下是部分標籤
<provider
android:name="com.android.provider.StudentProvider"
android:authorities="com.android.provider.StudentProvider"
/>
然後又用其他程序調用它時,總提示權限錯誤
java.lang.SecurityException: Permission Denial: opening provider com.android.provider.StudentProvider from ProcessRecord{b4054ef8 7614:com.example.test/u0a76} (pid=7614, uid=10076) that is not exported from uid 10068
我沒在provider裏邊設權限啊 爲什麼總是這樣??
答:
添加權限
<provider
android:exported="true"
android:name="com.android.provider.StudentProvider"
android:authorities="com.android.provider.StudentProvider"
/>