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

后端 未结 6 1544
伪装坚强ぢ
伪装坚强ぢ 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:02

    It may cause by an ACCOUNT_TYPE mismatch. check ACCOUNT_TYPE in Class and ACCOUNT_TYPE in authenticator.xml must match

    private static final String ACCOUNT_TYPE = "com.someonew.syncaccount";
    

    authenticator.xml

     
        
    

提交回复
热议问题