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.

  • Android Adding Account with AccountManager
    via Stack Overflow by rapid3642
    ,
  • securityexception
    via GitHub by dschuermann
    ,
  • Security Exception with AccountManager
    via Stack Overflow by QuentR
    ,
  • Crash Report [1.3.0, SyncUtils]
    via GitHub by Fleker
    ,
    • java.lang.SecurityException: uid 10335 cannot explicitly add accounts of type: com.example.rapid.rapid at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:890) at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:716) at com.example.rapid.rapid.LoginActivity$1$1.onResponse(LoginActivity.java:174) at com.example.rapid.rapid.LoginActivity$1$1.onResponse(LoginActivity.java:140) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:60) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:30) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7237) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    filipebatista
    12 times, last one,
    Hiren Amaliyar
    8 times, last one,
    Aravind
    86 times, last one,
    229 more bugmates