Go to our class which extended AbstractAccountAuthenticator and override addAccount method.
If addAccount method is not overrided and it is empty then the issue will be the same.
Override the method as shown.
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle bundle) throws NetworkErrorException {
final Bundle result = bundle;
Intent intent = new Intent(this.context, MainActivity.class);
intent.putExtra("authtokenType", authTokenType);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
result.putParcelable(AccountManager.KEY_INTENT, intent);
return result;
}
after adding this code, Go and check in the add Accounts of settings.