java.lang.SecurityException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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.

  • Contact sync on 4.4
    via GitHub by swiftgeek
    ,
  • GitHub comment 121#225428472
    via GitHub by misaochan
    ,
  • UserManager getUserCount() (Jelly Bean)
    via Stack Overflow by Kedi
    ,
  • Dealing with Download Listener in Android
    via Stack Overflow by Alok Kumar
    ,
    • java.lang.SecurityException: caller uid 10070 lacks any of android.permission.GET_ACCOUNTS at android.os.Parcel.readException(Parcel.java:1472) at android.os.Parcel.readException(Parcel.java:1426) at android.accounts.IAccountManager$Stub$Proxy.getAccountsAsUser(IAccountManager.java:647) at android.accounts.AccountManager.getAccountsByTypeAsUser(AccountManager.java:447) at android.accounts.AccountManager.getAccountsByType(AccountManager.java:441) at com.google.android.syncadapters.contacts.ContactsSyncAdapter.innerPerformSync(ContactsSyncAdapter.java:236) at com.google.android.syncadapters.contacts.ContactsSyncAdapter.onPerformLoggedSync(ContactsSyncAdapter.java:168) at com.google.android.common.LoggingThreadedSyncAdapter.onPerformSync(LoggingThreadedSyncAdapter.java:33) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)

    Users with the same issue

    Agócs Tamás
    2 times, last one,
    Larten
    1 times, last one,
    filipebatista
    13 times, last one,
    Hiren Amaliyar
    8 times, last one,
    Aravind
    86 times, last one,
    229 more bugmates