Invalid value for visibility: 2

Samebug tips5

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

You need to request READ_PHONE_STATE permissions before using of this method.

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

Solutions on the web1647

  • via by Unknown author, 8 months ago
    Invalid value for visibility: 2
  • via by Unknown author, 6 months ago
    Invalid value for visibility: 2
  • Invalid value for visibility: 1
  • Stack trace

    • java.lang.SecurityException: Invalid value for visibility: 2 at android.os.Parcel.readException(

    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

    669 times, 2 weeks ago
    86 times, 1 month ago
    201 times, 1 month ago
    2 times, 1 month ago
    3 times, 3 months ago
    232 more bugmates