Android app crashes on addAccountExplicitly(account, password, null);

后端 未结 6 1545
伪装坚强ぢ
伪装坚强ぢ 2021-01-03 19:22

After a successful basic authentication I want to add an account for later use. When I tried to create this account using the following code:

AccountManager          


        
6条回答
  •  花落未央
    2021-01-03 20:12

    In my case it was happening that I had another app installed on the device with the same account name and type, but with different signing cert that the one I was trying to install.

    So it was crashing the app.

    Checking the android doc for the method addAccountExplicity, it says:

    This method requires the caller to have a signature match with the authenticator that owns the specified account.

    That was my problem

提交回复
热议问题