java.lang.RuntimeException

Unable to start activity ComponentInfo{com.company.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{43247db0 14012:com.company/u0a370} (pid=14012, uid=10370) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS

Samebug tips5

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web40196

  • via Stack Overflow by abdel
    , 10 months ago
    Unable to start activity ComponentInfo{com.company.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{43247db0 14012:com.company/u0a370} (pid=14012, uid=10370) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
  • via GitHub by budinm1
    , 1 year ago
    Unable to start receiver com.owncloud.android.files.InstantUploadBroadcastReceiver: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{277bc9b 24750:com.owncloud.android.beta/u0a198} (pid=24750, uid=10198) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
  • via GitHub by Spielmops
    , 1 year ago
    Unable to start receiver com.owncloud.android.files.InstantUploadBroadcastReceiver: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{1295118a 10786:com.owncloud.android.beta/u0a121} (pid=10786, uid=10121) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{43247db0 14012:com.company/u0a370} (pid=14012, uid=10370) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2319) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2370) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5426) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{43247db0 14012:com.company/u0a370} (pid=14012, uid=10370) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS at android.os.Parcel.readException(Parcel.java:1472) at android.os.Parcel.readException(Parcel.java:1426) at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3039) at android.app.ActivityThread.acquireProvider(ActivityThread.java:4660) at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2347) at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1425) at android.content.ContentResolver.query(ContentResolver.java:445) at android.content.ContentResolver.query(ContentResolver.java:404) at com.company.Utils.Utilities.getFileName(Utilities.java:104) at com.company.MainActivity.onCreate(MainActivity.java:115) at android.app.Activity.performCreate(Activity.java:5296) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2283)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    194 times, 3 weeks ago
    21 times, 4 weeks ago
    3 times, 1 month ago
    8 times, 3 months ago
    7 times, 3 months ago
    234 more bugmates