Android中我試圖採取從庫存儲其URI的圖像,然後拉回來,但其顯示拋出:SecurityException加載一些電話說拋出:SecurityException PermissionDenial。請幫幫我。由於圖像不能在Android的
ImageView: Unable to open content: content://com.google.android.apps.photos.contentprovider/-1/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F70/NO_TRANSFORM/908138224
java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{12795c7f 18283:dccenter.dccenter.com.dccenter/u0a162} (pid=18283, uid=10162) that is not exported from uid 10106
at android.os.Parcel.readException(Parcel.java:1546)
at android.os.Parcel.readException(Parcel.java:1499)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3833)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:6084)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:3178)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1495)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1115)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:970)
at android.content.ContentResolver.openInputStream(ContentResolver.java:695)
at android.widget.ImageView.resolveUri(ImageView.java:784)
at android.widget.ImageView.setImageURI(ImageView.java:440)
at adapter.SlidingImageAdapter.instantiateItem(SlidingImageAdapter.java:118)
我的Android清單權限
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.apps.photos.permission.GOOGLE_PHOTOS" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>
已聲明的任何許可清單中? –
是的,我給了所有必要的權限。 – Rahul