java.lang.SecurityException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

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()

tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write on the Android Manifest

tip

MANAGE_USERS has a protection level of signature|system, so your application must be signed with the platform key. Take a look on this https://goo.gl/nXsTvH for more information about it.

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

  • GitHub comment 868#243217900
    via GitHub by k3b
    ,
  • Can not instantiate value of type using Firebase
    via by Unknown author,
  • RETRYABLE_NOT_AVAILABLE
    via GitHub by tobrun
    ,
    • java.lang.SecurityException: Neither user 10003 nor current process has android.permission.PACKAGE_USAGE_STATS. at android.os.Parcel.readException(Parcel.java:1465) at android.os.Parcel.readException(Parcel.java:1419) at com.android.internal.app.IUsageStats$Stub$Proxy.getAllPkgUsageStats(IUsageStats.java:237) at android.app.ActivityManager.getAllPackageUsageStats(ActivityManager.java:2224) at com.android.providers.applications.ApplicationsProvider.fetchUsageStats(ApplicationsProvider.java:714) at com.android.providers.applications.ApplicationsProvider.updateApplicationsList(ApplicationsProvider.java:548) at com.android.providers.applications.ApplicationsProvider.access$400(ApplicationsProvider.java:72) at com.android.providers.applications.ApplicationsProvider$UpdateHandler.handleMessage(ApplicationsProvider.java:232) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:61)

    Users with the same issue

    Aravind
    86 times, last one,
    iridic
    33 times, last one,
    Ranjana Dangol
    3 times, last one,
    gaurav
    9 times, last one,
    danleyb2Interintel
    13 times, last one,
    229 more bugmates