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.

  • Crash after Permission
    via GitHub by boredom2
    ,
  • GitHub comment 68#192697926
    via GitHub by xuefer
    ,
  • App Crashed While getting device Id
    via Stack Overflow by user2566484
    ,
  • GitHub comment 75#200156283
    via GitHub by stevecarlton
    ,
    • java.lang.SecurityException: com.android.phone from uid 10134 not allowed to perform OP_READ_PHONE_STATE at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getVoiceMailNumberForSubscriber(IPhoneSubInfo.java:858) at android.telephony.TelephonyManager.getVoiceMailNumber(TelephonyManager.java:2383) at android.telephony.TelephonyManager.getVoiceMailNumber(TelephonyManager.java:2366)

    Users with the same issue

    Indri Yunita
    2 times, last one,
    justCodeit
    31 times, last one,
    Adrien
    16 times, last one,
    filpgame
    9 times, last one,
    Unknown visitor1 times, last one,
    229 more bugmates