AccountManager does not add custom account in Android N preview

前端 未结 3 1843
太阳男子
太阳男子 2021-02-19 18:49

I have implemented a sync adapter in my app which requires an account to be added in the device account settings. I followed the same approach given in the Android docs. It work

3条回答
  •  后悔当初
    2021-02-19 19:46

    Not sure if this is the same issue, but there's an issue with AccountManager on the current version of the Android N image. Basically, if you:

    1. Add an account to AccountManager
    2. Uninstall the app
    3. Reinstall the app
    4. Try to add account again

    This will fail and you'll see the following in the log:

    W/AccountManagerService( 1503): insertAccountIntoDatabase: Account {name=foo@bar.com, type=com.foo.bar}, skipping since the account already exists

    This is a known issue and it's been reported to Google: https://code.google.com/p/android/issues/detail?id=210992 https://code.google.com/p/android/issues/detail?id=210951

提交回复
热议问题