java.lang.SecurityException

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.

  • screen off on button click
    via Stack Overflow by Geethu
    ,
  • UserManager getUserCount() (Jelly Bean)
    via Stack Overflow by Kedi
    ,
  • Dealing with Download Listener in Android
    via Stack Overflow by Alok Kumar
    ,
    • java.lang.SecurityException: Neither user 10031 nor current process has android.permission.DEVICE_POWER. at android.os.Parcel.readException(Parcel.java:1465) at android.os.Parcel.readException(Parcel.java:1419) at android.os.IPowerManager$Stub$Proxy.goToSleep(IPowerManager.java:441) at android.os.PowerManager.goToSleep(PowerManager.java:481) at com.mdt.hds.service.RemoteService$MessageHandler.handleMessage(RemoteService.java:53) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) 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:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

    Users with the same issue

    filipebatistafilipebatista
    3 times, last one,
    Hiren AmaliyarHiren Amaliyar
    46 times, last one,
    AravindAravind
    86 times, last one,
    Indri YunitaIndri Yunita
    199 times, last one,
    Unknown UserUnknown User
    4 times, last one,
    229 more bugmates