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.

  • Failed talking with KnoxCustomManager service | SEAP
    via by Unknown author,
  • TelephonyManager crashing on android studio
    via by Unknown author,
  • TelephonyManager crashing on android studio
    via Stack Overflow by jason
    ,
    • java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10040 nor current process has android.permission.READ_PHONE_STATE. at android.os.Parcel.readException(Parcel.java:1546) at android.os.Parcel.readException(Parcel.java:1499) at com.android.internal.telephony.ISub$Stub$Proxy.getActiveSubscriptionInfoList(ISub.java:584) at android.telephony.SubscriptionManager.getActiveSubscriptionInfoList(SubscriptionManager.java:588) at com.android.systemui.statusbar.BaseStatusBar.getNumberOfActiveSim(BaseStatusBar.java:1572) at com.android.systemui.statusbar.BaseStatusBar.updateRowStates(BaseStatusBar.java:3659) at com.android.systemui.statusbar.phone.PhoneStatusBar.updateRowStates(PhoneStatusBar.java:3411) at com.android.systemui.statusbar.phone.PhoneStatusBar.updateOverFlowView(PhoneStatusBar.java:9063) at com.android.systemui.statusbar.phone.NotificationPanelView.setQsExpansion(NotificationPanelView.java:2340) at com.android.systemui.statusbar.phone.NotificationPanelView.onLayout(NotificationPanelView.java:867) at android.view.View.layout(View.java:16939) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16939) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16939) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:16939) at android.view.ViewGroup.layout(ViewGroup.java:5409) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2464) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2167) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1301) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7016) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777) at android.view.Choreographer.doCallbacks(Choreographer.java:590) at android.view.Choreographer.doFrame(Choreographer.java:560) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6946) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

    Users with the same issue

    ashish.sadhwani
    2 times, last one,
    Unknown User
    2 times, last one,
    Indri Yunita
    2 times, last one,
    franky li
    4 times, last one,
    Ranjana Dangol
    12 times, last one,
    229 more bugmates