我正在创建联系人应用程序。该应用程序在首次启动时运行良好,但是在关闭并再次启动时出现以下错误:
java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.impl.MediaContentProvider from ProcessRecord{9d3109e 6774:com.example.mastermind.contacts_project/u0a239} (pid=6774, uid=10239) that is not exported from UID 10141
我正在从图库中挑选一张图像,将其作为图像路径存储在数据库中,然后检索该图像。
我已授予对WriteExternal存储的运行时权限。
java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.impl.MediaContentProvider from ProcessRecord{c7b621f 8137:com.example.mastermind.contacts_project/u0a239} (pid=8137, uid=10239) that is not exported from UID 10141
at android.os.Parcel.readException(Parcel.java:2029)
at android.os.Parcel.readException(Parcel.java:1975)
at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:4961)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:6277)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2656)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1930)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1413)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1266)
at android.content.ContentResolver.openInputStream(ContentResolver.java:986)
at android.provider.MediaStore$Images$Media.getBitmap(MediaStore.java:888)
at com.example.mastermind.contacts_project.MyCustomAdapter.onBindViewHolder(MyCustomAdapter.java:52)
at com.example.mastermind.contacts_project.MyCustomAdapter.onBindViewHolder(MyCustomAdapter.java:19)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1557)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4194)
at android.view.View.layout(View.java:19909)
at android.view.ViewGroup.layout(ViewGroup.java:6177)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
at android.view.View.layout(View.java:19909)
at android.view.ViewGroup.layout(ViewGroup.java:6177)
at