Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://...

在as中创建cordova中添加从相册选取照片的插件

$cordovaImagePicker

就是以上这货,调用后直接程序就崩溃了,并报错

Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://...

添加权限

<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>

然并卵。

官方说6.0以上是把权限提到了运行时。

我当时直接把最高版本降到了5.1

如下:

android:targetSdkVersion="22"

运行起来后,骚年就看到自己的插件就可以调用了,并可以在6.0以上运行。

如你还有其他解决方案请留言...
时间: 2024-08-04 21:06:20

Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://...的相关文章

因为Android M权限问题导致的&quot;Permission Denial: reading com.android.providers.media.MediaProvider&quot;解决办法

程序出错报告 在模拟器上调试程序,出错代码如下: Cursor cur = context.getContentResolver().query( MediaStore.Audio.Media.INTERNAL_CONTENT_URI, new String[] { MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.DURATION, MediaStore.Audio.Media.ARTIST, MediaStore.Audio.Media

ContentProvider异常:Caused by: java.lang.SecurityException: Permission Denial

在使用ContentProvider时抛出异常:Caused by: java.lang.SecurityException: Permission Denial 原因:在Provider的 Manifest文件中 对provider的属性描述时 没有 加入 属性 android:exported="true" android:exported属性非常重要.这个属性用于指示该服务是否能够被其他应用程序组件调用或跟它交互.如果设置为true,则能够被调用或交互,否则不能.

Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG

crash information:Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG from    at android.os.Parcel.readException(Parcel.java:1465)     at android.os.Parcel.readException(Parcel.j

访问不了自己创建的Contentprovider,报错:java.lang.SecurityException: Permission Denial

情景:1.A,B两个程序,A程序提供ContentProvider:B程序访问A程序的ContendProvider 2.在A程序中已经添加权限: <provider android:name=".provider.UserProvider" android:authorities="com.example.listview.userprovider"></provider> 问题:A程序部署后,再运行B程序,报错: 03-11 21:48:

java.lang.SecurityException: Permission Denial: opening provider

在测试调用外部提供的ContentProvider时候报一下错误: java.lang.SecurityException: Permission Denial: opening provider com.example.onehw.BookProvider from ProcessRecord{b2f1b230 8449:com.example.adtest/u0a53} (pid=8449, uid=10053) that is not exported from uid 10052 at

【Android】java.lang.SecurityException: Permission Denial: starting Intent 应用启动失败异常

异常提示 在Eclipse和Android Studio同时使用的时候,我遇到过这样一个异常,具体错误提示如下: ava.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.xxx.xxx/.activity.SplashActivity }

spring Caused by: java.lang.SecurityException: Prohibited package name: java.time

六月 09, 2014 1:05:02 下午 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8. 六月 09, 2014 1:05:03 下午 org.apache.catalina.core.AprLifecycleListener init 信息: APR capabilities

Caused by: java.lang.NoSuchMethodException: &amp;lt;init&amp;gt; [class android.content.Context, interface android

?? 在写自己定义的view时,有时会报下面错误: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] <view android:id="@id/viewpage_container" android:layout_width="fill_parent" and

记录一个调了半天的问题:java.lang.SecurityException: Permission denied (missing INTERNET permission?)

Move the <uses-permission> elements outside of <application>. They need to be immediate children of the root <manifest> element. 不然就会出现crush! 不用申请权限,改个位置即可.